Skip to content

Commit 45c63ab

Browse files
author
Shuwen Qian
committed
Add autoprefixer to gulp build
1 parent 590e32e commit 45c63ab

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Gulpfile.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ var marked = require('gulp-marked');
2020
var changed = require('gulp-changed');
2121
var es = require('event-stream');
2222
var cache = require('gulp-cached');
23+
var postcss = require('gulp-postcss');
24+
var autoprefixer = require('autoprefixer');
2325

2426
var SRC = 'src/';
2527
var BUILD = 'build/';
@@ -46,6 +48,7 @@ gulp.task('sass', function() {
4648
// .pipe(cache())
4749
.pipe(changed(BUILD, {extension:'.css'}))
4850
.pipe(sass({includePaths: ['./bower_components/bourbon/app/assets/stylesheets/', './src/shared/sass/']}).on('error', sass.logError))
51+
.pipe(postcss([autoprefixer({browsers: ['last 2 versions']})]))
4952
.pipe(gulp.dest(BUILD))
5053
// .pipe(wrap({src:TEMPLATES + "style_module_template.html"},{},{engine:"hogan"}))
5154
.pipe(wrap(function(data) {
@@ -117,7 +120,7 @@ gulp.task('vulcanize:prod', function() {
117120
}))
118121
.pipe(gulp.dest(BUILD));
119122
});
120-
123+
121124
/** DOCS **/
122125

123126
gulp.task('docs', function() {
@@ -141,4 +144,4 @@ gulp.task('watch', function () {
141144
// gulp.watch('./')
142145
});
143146

144-
/** DEPLOY **/
147+
/** DEPLOY **/

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
],
1515
"license": "BSD-3-Clause",
1616
"devDependencies": {
17+
"autoprefixer": "^6.1.2",
1718
"del": "^2.0.2",
1819
"event-stream": "^3.3.2",
1920
"glob": "^5.0.15",
@@ -42,6 +43,7 @@
4243
"gulp-inline-assets": "^0.1.1",
4344
"gulp-marked": "^1.0.0",
4445
"gulp-minify-html": "^1.0.4",
46+
"gulp-postcss": "^6.0.1",
4547
"gulp-rename": "^1.2.2",
4648
"gulp-sass": "^2.1.0",
4749
"gulp-util": "^3.0.7",

0 commit comments

Comments
 (0)