Last active
March 16, 2016 17:29
-
-
Save dehuszar/0cabbd9bd55372dd5117 to your computer and use it in GitHub Desktop.
PostCSS-Reference Gulp config
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
/* Move this file into src/ folder */ | |
var gulp = require('gulp'); | |
var postcss = require('gulp-postcss'); | |
var atImport = require('postcss-import'); | |
var nested = require('postcss-nested'); | |
var reference = require('postcss-reference'); | |
var mqpacker = require('css-mqpacker'); | |
gulp.task('css', function () { | |
return gulp.src('./src/*.css') | |
.pipe(postcss([ | |
atImport(), | |
nested(), | |
reference(), | |
mqpacker() | |
])) | |
.pipe(gulp.dest('./dest')); | |
}); |
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": "postcss-reference-bug-testing", | |
"version": "1.0.0", | |
"description": "Fixing ze bugs", | |
"main": "gulpfile.js", | |
"dependencies": { | |
}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"bootstrap": "^3.3.6", | |
"gulp": "^3.9.1", | |
"gulp-postcss": "^6.1.0", | |
"postcss-import": "^7.0.0", | |
"postcss-mixins": "^4.0.0", | |
"postcss-nested": "^1.0.0", | |
"postcss-reference": "^1.0.3", | |
"postcss-simple-vars": "^1.2.0" | |
} | |
} |
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
@reference { | |
@import "../node_modules/bootstrap/dist/css/bootstrap.css"; | |
} | |
.button { | |
@references .btn, .btn-default; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment