forked from djangocon/2017.djangocon.us
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
39 lines (34 loc) · 974 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var sherpa = require('style-sherpa');
var uglifycss = require('gulp-uglifycss');
var sassPaths = [
'node_modules/foundation-sites/scss',
'node_modules/motion-ui/src',
'node_modules/hamburgers/_sass/hamburgers'
];
gulp.task('sass', function() {
return gulp.src('_scss/styles.scss')
.pipe($.sass({
includePaths: sassPaths
})
.on('error', $.sass.logError))
.pipe($.autoprefixer({
browsers: ['last 2 versions', 'ie >= 10']
}))
.pipe(uglifycss({
"maxLineLen": 80,
"uglyComments": true
}))
.pipe(gulp.dest('static/css'));
});
gulp.task('styleguide', function() {
sherpa('_styleguide/styleguide.md', {
output: 'styleguide/index.html',
template: '_styleguide/template.hbs'
});
});
gulp.task('default', ['sass'], function() {
gulp.watch(['_scss/**/*.scss'], ['sass']);
gulp.watch(['_styleguide/**/*.*'], ['styleguide']);
});