mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-09 11:16:39 -05:00
Use pure autoprefixer and support the last 6 browser versions
This commit is contained in:
parent
a9d46982be
commit
4f13135f97
2 changed files with 9 additions and 5 deletions
11
gulpfile.js
11
gulpfile.js
|
@ -6,6 +6,8 @@ var gulp = require("gulp"),
|
|||
gPlumber = require("gulp-plumber"),
|
||||
gUglify = require("gulp-uglify"),
|
||||
gModernizr = require("gulp-modernizr"),
|
||||
gPostCSS = require("gulp-postcss"),
|
||||
autoprefixer = require("autoprefixer"),
|
||||
lessGlob = require("less-plugin-glob"),
|
||||
lessAutoPrefix = require("less-plugin-autoprefix"),
|
||||
lessCleanCSS = require("less-plugin-clean-css");
|
||||
|
@ -14,11 +16,11 @@ var gulp = require("gulp"),
|
|||
var prod = gUtil.env.production;
|
||||
|
||||
// initialize plugins
|
||||
var autoprefix = new lessAutoPrefix({ remove: false, cascade: false, browsers: [ "last 2 versions" ] }),
|
||||
cleancss = new lessCleanCSS({ advanced: true });
|
||||
var cleancss = new lessCleanCSS({ advanced: true });
|
||||
|
||||
// declare less plugins and modernizr tests
|
||||
var lessPlugins = prod ? [ lessGlob, autoprefix, cleancss ] : [ lessGlob, autoprefix ],
|
||||
// declare plugin settings and modernizr tests
|
||||
var lessPlugins = prod ? [ lessGlob, cleancss ] : [ lessGlob ],
|
||||
autoprefixerSettings = { remove: false, cascade: false, browsers: [ "last 6 versions" ] },
|
||||
modernizrTests = [];
|
||||
|
||||
// javascript files for the public site
|
||||
|
@ -68,6 +70,7 @@ function processLess(filename) {
|
|||
return gulp.src("resources/assets/less/" + filename + ".less")
|
||||
.pipe(gPlumber(plumberError))
|
||||
.pipe(gLess({ plugins: lessPlugins, paths: "bower_components/" }))
|
||||
.pipe(gPostCSS([ autoprefixer(autoprefixerSettings) ]))
|
||||
.pipe(gConcat(filename + ".css"))
|
||||
.pipe(gulp.dest("public/css/"));
|
||||
}
|
||||
|
|
|
@ -4,14 +4,15 @@
|
|||
"gulp-livereload": "^3.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"autoprefixer": "^6.3.6",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-less": "^3.0.5",
|
||||
"gulp-modernizr": "^1.0.0-alpha",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-postcss": "^6.1.1",
|
||||
"gulp-uglify": "^1.5.3",
|
||||
"gulp-util": "^3.0.7",
|
||||
"less-plugin-autoprefix": "^1.5.1",
|
||||
"less-plugin-clean-css": "^1.5.1",
|
||||
"less-plugin-glob": "^1.1.1"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue