-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgulpfile.js
More file actions
52 lines (45 loc) · 1.33 KB
/
gulpfile.js
File metadata and controls
52 lines (45 loc) · 1.33 KB
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 jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var gulp = require('gulp');
var clean = require('gulp-clean');
var shell = require('gulp-shell');
var ngAnnotate = require('gulp-ng-annotate');
gulp.task('default', ['clean', 'ngannotate', 'lint', 'shell', 'ngannotate', 'ngdocs']);
gulp.task('ngdocs', ['clean'], function () {
var gulpDocs = require('gulp-ngdocs');
var options = {
scripts: [
'bower_components/angular/angular.js',
'bower_components/angular-animate/angular-animate.js'
],
html5Mode: false,
startPage: '/api',
title: "Enable Project Documentation"
};
return gulpDocs.sections({
api: {
glob:['js/*.js'],
api: true,
title: 'API Documentation'
}
}).pipe(gulpDocs.process(options)).pipe(gulp.dest('./docs'));
});
gulp.task('shell', shell.task([
'python siteindex.py'
]));
gulp.task('lint', function() {
return gulp.src('./js/*.js')
.pipe(jshint())
.pipe(jshint.reporter(stylish))
});
gulp.task('ngannotate', function () {
var options = {
singleQuotes: true
};
return gulp.src('./js/**.js')
.pipe(ngAnnotate(options))
});
gulp.task('clean', function () {
return gulp.src('./docs', {read: false})
.pipe(clean());
});