-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
29 lines (24 loc) · 896 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
'use strict';
var gulp = require('gulp'),
htmlmin = require('gulp-htmlmin'),
sass = require('gulp-sass'),
shell = require('gulp-shell');
gulp.task('html', function() {
return gulp
.src('src/chat-form/*.html')
.pipe(htmlmin({ collapseWhitespace: true }))
.pipe(gulp.dest('dist/server/chat-form/'));
});
gulp.task('sass', function() {
return gulp
.src('src/chat-form/form.sass')
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
.pipe(gulp.dest('dist/server/chat-form/'));
});
gulp.task('compileTS', shell.task('./node_modules/.bin/tsc && ./node_modules/webpack/bin/webpack.js'));
gulp.task('cpImages', shell.task('cp -a src/common/images dist/server/chat-form/'));
gulp.task('watch', function() {
gulp.watch('src/**/*.sass', ['sass']);
gulp.watch('src/chat-form/index.html', ['html']);
gulp.watch('src/**/*.ts', ['compileTS']);
});