Commit c7eb46d45a8619ec5068dca4a9a0b68ec1d16dbb
1 parent
7b837dbc
Exists in
master
and in
31 other branches
Added ngdocs configuration
Showing
5 changed files
with
48 additions
and
2 deletions
Show diff stats
.gitignore
gulp/build.js
@@ -98,4 +98,8 @@ gulp.task('clean', function () { | @@ -98,4 +98,8 @@ gulp.task('clean', function () { | ||
98 | return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]); | 98 | return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]); |
99 | }); | 99 | }); |
100 | 100 | ||
101 | +gulp.task('clean-docs', [], function() { | ||
102 | + return $.del([path.join(conf.paths.docs, '/')]); | ||
103 | +}); | ||
104 | + | ||
101 | gulp.task('build', ['html', 'fonts', 'other']); | 105 | gulp.task('build', ['html', 'fonts', 'other']); |
gulp/conf.js
gulpfile.js
@@ -27,3 +27,42 @@ wrench.readdirSyncRecursive('./gulp').filter(function(file) { | @@ -27,3 +27,42 @@ wrench.readdirSyncRecursive('./gulp').filter(function(file) { | ||
27 | gulp.task('default', ['clean'], function () { | 27 | gulp.task('default', ['clean'], function () { |
28 | gulp.start('build'); | 28 | gulp.start('build'); |
29 | }); | 29 | }); |
30 | + | ||
31 | +gulp.task('ngdocs', ['clean-docs'], function () { | ||
32 | + var gulpDocs = require('gulp-ngdocs'); | ||
33 | + var options = { | ||
34 | + scripts: [ | ||
35 | + 'bower_components/angular/angular.min.js', | ||
36 | + 'bower_components/angular/angular.min.js.map', | ||
37 | + 'bower_components/angular-animate/angular-animate.min.js', | ||
38 | + 'bower_components/angular-animate/angular-animate.min.js.map' | ||
39 | + //'bower_components/angular/angular.js' | ||
40 | + ], | ||
41 | + html5Mode: true, | ||
42 | + startPage: '/', | ||
43 | + title: "Noosfero Angular Theme Documentation", | ||
44 | + //image: "path/to/my/image.png", | ||
45 | + //imageLink: "http://my-domain.com", | ||
46 | + titleLink: "/", | ||
47 | + loadDefaults: { | ||
48 | + angular: false, | ||
49 | + angularAnimate: false | ||
50 | + } | ||
51 | + } | ||
52 | + return gulpDocs.sections({ | ||
53 | + api: { | ||
54 | + glob:[ | ||
55 | + //'src/**/*.js', '!src/noosfero.js', '!src/noosfero-specs.js' | ||
56 | + //'src/noosfero.js' | ||
57 | + 'src/**/*.ts' | ||
58 | + ],//, '!src/**/*.spec.js'], | ||
59 | + api: true, | ||
60 | + title: 'API Documentation' | ||
61 | + }, | ||
62 | + tutorial: { | ||
63 | + glob: ['content/tutorial/*.ngdoc'], | ||
64 | + title: 'Tutorial' | ||
65 | + } | ||
66 | + }).pipe(gulpDocs.process(options)).pipe(gulp.dest('./docs')); | ||
67 | +}); | ||
68 | + |
package.json
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | "dependencies": { | 4 | "dependencies": { |
5 | "angular": "^1.5.0", | 5 | "angular": "^1.5.0", |
6 | "angular-mock": "^1.0.0", | 6 | "angular-mock": "^1.0.0", |
7 | - "moment": "^2.11.2" | 7 | + "moment": "^2.11.2" |
8 | }, | 8 | }, |
9 | "scripts": { | 9 | "scripts": { |
10 | "webpack": "webpack", | 10 | "webpack": "webpack", |
@@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
41 | "gulp-minify-css": "~1.2.1", | 41 | "gulp-minify-css": "~1.2.1", |
42 | "gulp-minify-html": "~1.0.4", | 42 | "gulp-minify-html": "~1.0.4", |
43 | "gulp-ng-annotate": "~1.1.0", | 43 | "gulp-ng-annotate": "~1.1.0", |
44 | + "gulp-ngdocs": "0.2.13", | ||
44 | "gulp-protractor": "~1.0.0", | 45 | "gulp-protractor": "~1.0.0", |
45 | "gulp-rename": "~1.2.2", | 46 | "gulp-rename": "~1.2.2", |
46 | "gulp-replace": "~0.5.4", | 47 | "gulp-replace": "~0.5.4", |