forked from space10-community/conversational-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (29 loc) · 1.19 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
global.gulp = require('gulp');
var fs = require('fs');
var livereload = require('./gulp-tasks/node_modules/gulp-livereload');
var package = JSON.parse(fs.readFileSync('gulp-tasks/package.json'));
// include task files
require("./gulp-tasks/styles");
require("./gulp-tasks/scripts");
require("./gulp-tasks/images");
require("./gulp-tasks/bower");
//options
var srcFolder = './src/';
global.srcFolder = srcFolder;
var buildFolder = './build/';
global.buildFolder = buildFolder;
var distFolder = './dist/';
global.distFolder = distFolder;
// Watch Files For Changes
global.gulp.task('watch', ['bower', 'typescript', 'stylus', 'copy-images'], function() {
livereload.listen();
console.log("Watch task started");
global.gulp.watch(srcFolder + '/scripts/**/*.ts', ['typescript']);
global.gulp.watch(srcFolder + '/scripts/**/*.js', ['scripts']);
global.gulp.watch(srcFolder + '/images/**/*', ['copy-images']);
global.gulp.watch(srcFolder + '/styles/**/*.styl', ['stylus']);
});
// Default tasks
global.gulp.task('default', ['watch']);
global.gulp.task('build', ['bower', 'scripts-build', 'styles-build', 'copy-images']);
global.gulp.task('dist', ['bower', 'scripts-build', 'styles-build', 'copy-images']);