Last active
July 1, 2016 17:33
-
-
Save diverted247/e4f15bf126ffb290fce956a3703d07b5 to your computer and use it in GitHub Desktop.
Gulp PostCSS Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var postcssImport = require('postcss-import'); | |
var autoprefixer = require('autoprefixer'); | |
var customProperties = require("postcss-custom-properties"); | |
var calc = require("postcss-calc") | |
var processors = [ postcssImport(), customProperties(), calc() , autoprefixer({browsers: ['> 1%','last 2 versions']}) ]; | |
var postcss = require('gulp-postcss'); | |
var rename = require("gulp-rename"); | |
var minimist = require('minimist'); | |
var options; | |
gulp.task('css', function () { | |
return gulp.src(['./src/style/style.css']) | |
.pipe( postcss(processors) ) | |
.pipe( rename("core.css") ) | |
.pipe( gulp.dest('assets/css/') ); | |
}); | |
gulp.task('css:watch', function () { | |
gulp.watch(['./src/style/*.css'], ['css']); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "gulpPostcss", | |
"version": "1.0.0", | |
"description": "gulpPostcss", | |
"private": true, | |
"license": "UNLICENSED", | |
"devDependencies": { | |
"autoprefixer": "6.0.1", | |
"gulp": "3.9.0", | |
"gulp-postcss": "6.0.1", | |
"postcss-calc": "5.0.0", | |
"postcss-custom-properties": "5.0.0", | |
"postcss-import": "7.1.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment