Skip to content

Commit 2f7e4c0

Browse files
wosinekmprotomouse
authored and
protomouse
committed
feat(gen) add grunt-ngdoc
Add jsdoc to generated text and add grunt-ngdocs generated documentation to /docs. Add grunt-ngdocs to package.json & Gruntfile.js. Basic support in js templates. Watch for changes in js files & autoreload docs after regeneration. Init work at yeoman#550
1 parent b779a6c commit 2f7e4c0

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

templates/common/root/_Gruntfile.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = function (grunt) {
5151
},<% } else { %>
5252
js: {
5353
files: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],
54-
tasks: ['newer:jshint:all'],
54+
tasks: ['ngdocs', 'newer:jshint:all'],
5555
options: {
5656
livereload: '<%%= connect.options.livereload %>'
5757
}
@@ -521,6 +521,13 @@ module.exports = function (grunt) {
521521
%>',
522522
singleRun: true
523523
}
524+
},
525+
ngdocs: {
526+
options: {
527+
dest: '.tmp/docs',
528+
html5Mode: false
529+
},
530+
api: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],
524531
}
525532
});
526533

@@ -534,7 +541,7 @@ module.exports = function (grunt) {
534541
'clean:server',
535542
'wiredep',
536543
'concurrent:server',
537-
'autoprefixer:server',
544+
'ngdocs',
538545
'connect:livereload',
539546
'watch'
540547
]);

templates/common/root/_package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"grunt-wiredep": "^2.0.0",
3030
"jshint-stylish": "^1.0.0",
3131
"load-grunt-tasks": "^3.1.0",
32-
"time-grunt": "^1.0.0"
32+
"time-grunt": "^1.0.0",
33+
"grunt-ngdocs": "~0.1.7"
3334
},
3435
"engines": {
3536
"node": ">=0.10.0"

0 commit comments

Comments
 (0)