-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
46 lines (37 loc) · 1.04 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
'use strict';
const gulp = require('gulp');
const sass = require('gulp-sass');
const nightwatch = require('gulp-nightwatch')
gulp.task('sass', function () {
return gulp.src('./client/sass/app.scss')
.pipe(sass({
includePaths: [
'node_modules'
]
}).on('error', sass.logError))
.pipe(gulp.dest('./build/static'))
.pipe(gulp.dest('./build/app'));
});
gulp.task('sass:watch', function () {
gulp.watch('./client/sass/**/*.scss', ['sass']);
});
gulp.task('copy', function() {
return [
gulp.src('app/index.html')
.pipe(gulp.dest('build/app')),
gulp.src('common/*.html')
.pipe(gulp.dest('build/common')),
gulp.src('favicon.ico')
.pipe(gulp.dest('build/static')),
gulp.src('client/font/**/*', { base: 'client/font'})
.pipe(gulp.dest('build/static/font'))
.pipe(gulp.dest('build/app/font'))
];
});
gulp.task('test', () => {
return gulp.src('')
.pipe(nightwatch({
configFile: 'nightwatch.conf.js'
}))
})
gulp.task('default', ['copy', 'sass']);