forked from levlaz/braindump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
48 lines (40 loc) · 1.13 KB
/
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
40
41
42
43
44
45
46
47
48
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var cleanCSS = require('gulp-clean-css');
var sass = require('gulp-sass');
var vendor = {
css: [
'node_modules/bootstrap/dist/css/bootstrap.min.css',
'node_modules/bootstrap-tagsinput/src/bootstrap-tagsinput.css',
'node_modules/font-awesome/css/font-awesome.min.css'
]
};
var dist = {
fonts: 'app/static/fonts/',
css: 'app/static/css/',
img: 'app/static/img/'
};
gulp.task('vendor', function() {
gulp.src(vendor.css)
.pipe(concat('vendor.min.css'))
.pipe(gulp.dest(dist.css))
;
gulp.src('node_modules/font-awesome/fonts/*')
.pipe(gulp.dest(dist.fonts))
;
gulp.src('node_modules/bootstrap/dist/fonts/*')
.pipe(gulp.dest(dist.fonts))
;
});
gulp.task('sass', function () {
return gulp.src('./frontend/sass/**/*.scss')
.pipe(sass.sync().on('error', sass.logError))
.pipe(concat('app.min.css'))
.pipe(cleanCSS())
.pipe(gulp.dest(dist.css));
});
gulp.task('sass:watch', function () {
gulp.watch('./frontend/sass/*.scss', ['sass']);
});
gulp.task('default', ['vendor', 'sass:watch']);