Skip to content

Instantly share code, notes, and snippets.

@jacobp100
Created May 12, 2016 19:02
Show Gist options
  • Select an option

  • Save jacobp100/02960f82d947d640a4b90f23737785f6 to your computer and use it in GitHub Desktop.

Select an option

Save jacobp100/02960f82d947d640a4b90f23737785f6 to your computer and use it in GitHub Desktop.
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