Created
May 12, 2016 19:02
-
-
Save jacobp100/02960f82d947d640a4b90f23737785f6 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 { camelCase } from 'lodash'; | |
| import gulp from 'gulp'; | |
| import sass from 'gulp-sass'; | |
| import postcss from 'gulp-postcss'; | |
| import transformClasses from 'postcss-transform-classes'; | |
| import autoprefixer from 'autoprefixer'; | |
| const keywordsThatAppearInBootstrap = { | |
| in: '$in', | |
| }; | |
| gulp.task('compile-bootstrap', () => ( | |
| gulp.src('scss/bootstrap.scss') | |
| .pipe(sass()) | |
| .pipe(postcss([ | |
| transformClasses({ | |
| transform: (name) => ( | |
| name in keywordsThatAppearInBootstrap | |
| ? keywordsThatAppearInBootstrap[name] | |
| : camelCase(name) | |
| ), | |
| }), | |
| autoprefixer({ | |
| browsers: ['last 2 versions'], | |
| }), | |
| ])) | |
| .pipe(gulp.dest('styles')) | |
| )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment