Created
May 12, 2016 19:41
-
-
Save jacobp100/b1bad734f0235e611a3debf442cd4b2f to your computer and use it in GitHub Desktop.
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
| import cssnano from 'gulp-cssnano'; | |
| import esCssModules from 'es-css-modules'; | |
| gulp.task('compile-css', ['compile-bootstrap'], () => { | |
| const cssClass = cssClassGenerator(); | |
| return gulp.src('styles/**/*.css') | |
| .pipe(postcss([ | |
| esCssModules({ | |
| jsFiles: 'src/index.js', | |
| generateScopedName: () => cssClass.next().value, | |
| warnOnUnusedClasses: false, | |
| }), | |
| ])) | |
| .pipe(cssnano({ | |
| discardComments: { | |
| removeAll: true, | |
| }, | |
| })) | |
| .pipe(gulp.dest('dist')); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment