2016-01-31 14:24:53 +00:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var gutil = require('gulp-util');
|
|
|
|
var sass = require('gulp-sass');
|
|
|
|
|
|
|
|
gulp.task('fonts', function() {
|
|
|
|
gulp.src('./node_modules/bootstrap-sass/assets/fonts/bootstrap/*')
|
2016-02-02 19:13:07 +00:00
|
|
|
.pipe(gulp.dest('./static/fonts'));
|
2016-01-31 14:24:53 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('sass', function() {
|
2016-02-02 19:13:07 +00:00
|
|
|
return gulp.src("./static/css/theme.scss")
|
2016-01-31 14:24:53 +00:00
|
|
|
.pipe(sass().on('error', handleError))
|
2016-02-02 19:13:07 +00:00
|
|
|
.pipe(gulp.dest('./static/css'));
|
|
|
|
});
|
|
|
|
|
2016-02-04 21:33:40 +00:00
|
|
|
gulp.task('watch', function() {
|
|
|
|
gulp.watch('./static/**/*.scss', ['sass']);
|
|
|
|
});
|
|
|
|
|
2016-02-02 19:13:07 +00:00
|
|
|
gulp.task('default', function() {
|
|
|
|
gulp.start('fonts', 'sass');
|
2016-01-31 14:24:53 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
function handleError(err) {
|
|
|
|
gutil.log(err);
|
|
|
|
this.emit('end');
|
|
|
|
}
|