Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

feat(gen) add grunt-ngdoc to Gruntfile #680

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions templates/common/root/_Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ module.exports = function (grunt) {
coffeeTest: {
files: ['test/spec/{,*/}*.{coffee,litcoffee,coffee.md}'],
tasks: ['newer:coffee:test', 'karma']
},
jsdocs: {
files: ['.tmp/scripts/{,*/}*.js'],
tasks: ['ngdocs'],
options: {
livereload: true
}
},<% } else { %>
js: {
files: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],
tasks: ['newer:jshint:all'],
tasks: ['ngdocs', 'newer:jshint:all'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these tasks be reversed or does it matter?

options: {
livereload: '<%%= connect.options.livereload %>'
}
Expand All @@ -67,8 +74,7 @@ module.exports = function (grunt) {
},
files: [
'<%%= yeoman.app %>/{,*/}*.html',
'.tmp/styles/{,*/}*.css',<% if (coffee) { %>
'.tmp/scripts/{,*/}*.js',<% } %>
'.tmp/styles/{,*/}*.css',
'<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
}
Expand Down Expand Up @@ -392,6 +398,16 @@ module.exports = function (grunt) {
cwd: '<%%= yeoman.app %>/styles',
dest: '.tmp/styles/',
src: '{,*/}*.css'
},
ngdocs: {
expand: true,
cwd: '<%%= yeoman.app %>/docs',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not a fan of having the docs in the actual site

dest: '.tmp/docs/',
src: [
'*.{ico,png,txt}',
'.htaccess',
'*.html',
]
}
},

Expand Down Expand Up @@ -422,6 +438,13 @@ module.exports = function (grunt) {
configFile: 'karma.conf.js',
singleRun: true
}
},
ngdocs: {
options: {
dest: '.tmp/docs',
html5Mode: false
},
api: ['<% if (coffee) { %>.tmp<% } else { %><%%= yeoman.app %><% } %>/scripts/{,*/}*.js'],
}
});

Expand All @@ -436,6 +459,7 @@ module.exports = function (grunt) {
'wiredep',
'concurrent:server',
'autoprefixer',
'ngdocs',
'connect:livereload',
'watch'
]);
Expand All @@ -462,6 +486,7 @@ module.exports = function (grunt) {
'autoprefixer',
'concat',
'ngmin',
'ngdocs',
'copy:dist',
'cdnify',
'cssmin',
Expand Down
1 change: 1 addition & 0 deletions templates/common/root/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.1.1",
"grunt-wiredep": "^1.7.0",
"grunt-ngdocs": "^0.2.2",
"jshint-stylish": "^0.2.0",
"load-grunt-tasks": "^0.4.0",
"time-grunt": "^0.3.1"
Expand Down