diff --git a/templates/gulpfile.js.twig b/templates/gulpfile.js.twig index 4325411538b937b3c18814a6ad157b90ac73e496..2d0fdbca98a220e602123e3a6d76ed27054b05be 100644 --- a/templates/gulpfile.js.twig +++ b/templates/gulpfile.js.twig @@ -1,8 +1,10 @@ // Run with "--env production" to get production optimized output // Load plugins -var gulp = require('gulp'), +var autoprefixer = require('autoprefixer'), + gulp = require('gulp'), gulpif = require('gulp-if'), + postcss = require('gulp-postcss'), sass = require('gulp-sass'), sourcemaps = require('gulp-sourcemaps'), notify = require('gulp-notify'), @@ -58,11 +60,12 @@ gulp.task('css', function() { '{{ package.sass.relative }}', {% endif %} {% endfor %} - ]}) - .on("error", notify.onError(function (error) { - return "Error: " + error.message; - }))) - .pipe(gulpif(options.env !== 'production', sourcemaps.write('./maps'))) + ]}) + .on("error", notify.onError(function (error) { + return "Error: " + error.message; + }))) + .pipe(postcss([autoprefixer()])) + .pipe(gulpif(options.env !== 'production', sourcemaps.write('./maps'))) .pipe(gulp.dest(config.cssPath)); }); diff --git a/templates/package.json b/templates/package.json index 344e7883cbd6f7495402fb458c87f3e8d13f3d74..114665fb6317036b7c3a9edf5e0ce65c959fcdfe 100644 --- a/templates/package.json +++ b/templates/package.json @@ -4,13 +4,19 @@ "node": ">=4.2.0" }, "dependencies": { + "autoprefixer": "^7.1.1", "gulp": "^3.9.0", "gulp-if": "^2.0.0", "gulp-notify": "^2.2.0", + "gulp-postcss": "^7.0.0", "gulp-sass": "^2.0.5", "gulp-sourcemaps": "^1.6.0", "minimist": "^1.2.0" }, + "browserslist": [ + "> 1%", + "last 2 versions" + ], "scripts": { "postinstall": "find node_modules/ -name '*.info' -type f -delete" } diff --git a/templates/sass/_settings.scss.twig b/templates/sass/_settings.scss.twig index c77cd2ba5d504d18d93413ed43242a598fcab04f..f7998c338c6c816a5d800670629dbbce121e5005 100644 --- a/templates/sass/_settings.scss.twig +++ b/templates/sass/_settings.scss.twig @@ -4,14 +4,14 @@ // Set the directory for the Bootstrap Glyphicon font. $icon-font-path: '../fonts/bootstrap/'; {% endif %} -{% if bower_assets['flat-ui'] is defined %} +{% if bower_assets['flat-ui-sass'] is defined %} // Workaround for Flat-UI issue with node-sass: // @see https://github.com/wingrunr21/flat-ui-sass/issues/39 @function tint($color, $percentage){ @return mix(#fff, $color, $percentage) } -{% if bower_assets['flat-ui'].fonts is defined %} +{% if bower_assets['flat-ui-sass'].fonts is defined %} // Set the directory for the Flat-UI Glyphicon font. $icon-font-path: '../fonts/flat-ui'; $icon-font-name: 'flat-ui-icons-regular';