-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
55 lines (48 loc) · 1.24 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
49
50
51
52
53
54
55
var gulp = require('gulp'),
slim = require("gulp-slm");
var slimSources = ['app/**/*.slim'];
gulp.task('copy', function() {
gulp.src([
'./app/**/*.js',
'./app/**/*.css',
'./app/**/*.json',
'./app/**/*.html'
], {
base: './app/'
})
.pipe(gulp.dest('build'));
gulp.src('webextensions-lib-shortcut-customize-ui/**/*.js')
.pipe(gulp.dest('build/webextensions-lib-shortcut-customize-ui'));
});
gulp.task('slim', function() {
gulp.src(slimSources)
.pipe(slim({
pretty: true
}))
.pipe(gulp.dest("build/"));
});
gulp.task('img', function() {
gulp.src('img/*')
.pipe(gulp.dest('build/img/'))
});
gulp.task('css', function() {
gulp.src('app/css/*.scss')
.pipe(sass({
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(concat('style.css'))
.pipe(gulp.dest('build/css'));
});
gulp.task('watch', function() {
gulp.watch([
'./app/**/*.js',
'./webextensions-lib-shortcut-customize-ui/**/*.js',
'./app/**/*.css',
'./app/**/*.json',
'./app/**/*.html'
], ['copy']);
gulp.watch('app/img/*', ['img']);
gulp.watch(slimSources, ['slim']);
})
gulp.task('build', ['copy', 'slim', 'img']);
gulp.task('default', ['copy', 'slim', 'img', 'watch']);