Created
February 9, 2015 19:58
-
-
Save EdwardIrby/cedce39e0134cbe0a682 to your computer and use it in GitHub Desktop.
rework postcss gulp task
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
//Rework Plugins | |
var plugins = { | |
calc:require("rework-calc"), | |
colorFunction: require("rework-color-function"), | |
customMedia:require("rework-custom-media"), | |
fontVariant:require("rework-font-variant"), | |
hexAlpha:require("rework-hex-alpha"), | |
import: require("rework-import"), | |
inherit:require("rework-inherit"), | |
//at2x:require("rework-plugin-at2x"), | |
colors:require("rework-plugin-colors"), | |
ease:require("rework-plugin-ease"), | |
function:require("rework-plugin-function"), | |
inline:require("rework-plugin-inline"), | |
mixin:require("rework-plugin-mixin"), | |
references:require("rework-plugin-references"), | |
vars:require("rework-vars") | |
}; | |
gulp.task('styles:rework', function(){ | |
return gulp.src("app/modules/**/*.css") | |
//.pipe($.plumber()) | |
.pipe($.rework( | |
plugins.calc, | |
plugins.colorFunction, | |
//plugins.customMedia(mediaOptions), | |
plugins.fontVariant, | |
plugins.hexAlpha, | |
plugins.import({path:[ | |
//'app/css', | |
'app/modules/**/*.css']}), | |
plugins.inherit(), | |
//plugins.at2x(), | |
plugins.colors(), | |
plugins.ease(), | |
//plugins.function(styleFunctions), | |
plugins.inline('images/', 'fonts/'), | |
//plugins.mixin(), | |
plugins.references(), | |
//plugins.vars({ | |
// map: varsMap, | |
// preserve: true | |
// | |
//}), | |
{ sourcemap: true } | |
)) | |
//.pipe($.autoprefixer({browsers: ['last 1 version']})) | |
.pipe(gulp.dest('.tmp/modules')) | |
// Concatenate And Minify Styles | |
//.pipe($.csso()) | |
//.pipe(gulp.dest('dist')) | |
.pipe($.size({title: 'styles'})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment