forked from tymondesigns/angular-locker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
52 lines (42 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
var gulp = require('gulp'),
fizzy = require('fizzy'),
pkg = require('./package.json'),
config = require('./config'),
paths = config.paths;
// Lint the JS
gulp.task('lint', fizzy.task('lint', { src: paths.scripts }));
// Remove the output folder
gulp.task('clean', fizzy.task('clean', { src: paths.output }));
// Build the output folder
gulp.task('scripts', ['clean'], fizzy.task('scripts', {
src: paths.scripts,
dest: paths.output,
header: [config.banner, { pkg: pkg }]
}));
// Run the tests
gulp.task('test', fizzy.task('test', {
src: paths.vendor.concat(paths.scripts, paths.test),
karmaConfigFile: paths.karma
}));
// Build the readme
gulp.task('gitdown', fizzy.task('gitdown', {
src: paths.gitdown.src,
dest: paths.gitdown.dest
}));
// Define the build tasks
gulp.task('build', ['lint', 'scripts', 'test', 'gitdown']);
// Increment versions
gulp.task('version', fizzy.task('version', {
src: paths.versions,
currentVersion: pkg.version
}));
// release a new version
gulp.task('release', ['version'], function () {
gulp.run('build');
});
// Watch for changes
gulp.task('watch', function () {
gulp.watch(paths.scripts, ['lint']);
gulp.watch(paths.gitdown.glob, ['gitdown']);
});
gulp.task('default', ['build']);