Skip to content

Commit

Permalink
feat(gen) add grunt-ngdoc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wosinekm authored and protomouse committed Feb 11, 2015
1 parent aeeda81 commit 51c5a36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions templates/common/root/_Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = function (grunt) {
},<% } else { %>
js: {
files: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],
tasks: ['newer:jshint:all'],
tasks: ['ngdocs', 'newer:jshint:all'],
options: {
livereload: '<%%= connect.options.livereload %>'
}
Expand Down Expand Up @@ -521,6 +521,13 @@ module.exports = function (grunt) {
%>',
singleRun: true
}
},
ngdocs: {
options: {
dest: '.tmp/docs',
html5Mode: false
},
api: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],
}
});

Expand All @@ -534,7 +541,7 @@ module.exports = function (grunt) {
'clean:server',
'wiredep',
'concurrent:server',
'autoprefixer:server',
'ngdocs',
'connect:livereload',
'watch'
]);
Expand Down
3 changes: 2 additions & 1 deletion templates/common/root/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"grunt-wiredep": "^2.0.0",
"jshint-stylish": "^1.0.0",
"load-grunt-tasks": "^3.1.0",
"time-grunt": "^1.0.0"
"time-grunt": "^1.0.0",
"grunt-ngdocs": "~0.1.7"
},
"engines": {
"node": ">=0.10.0"
Expand Down

0 comments on commit 51c5a36

Please sign in to comment.