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

Conversation

marcin-wosinek
Copy link
Contributor

Grunt part of the pull request #551

@marcin-wosinek
Copy link
Contributor Author

How much test coverage should be have here?

@@ -38,10 +38,17 @@ module.exports = function (grunt) {
coffeeTest: {
files: ['test/spec/{,*/}*.{coffee,litcoffee,coffee.md}'],
tasks: ['newer:coffee:test', 'karma']
},
js: {
Copy link
Member

Choose a reason for hiding this comment

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

this should probably get named jsdocs

@eddiemonge
Copy link
Member

@marcin-wosinek
Copy link
Contributor Author

In the lines you've mentioned I've added watching for changes in documentation.

@eddiemonge
Copy link
Member

I meant this line will livereload and put files in .tmp: https://github.com/yeoman/generator-angular/pull/680/files#diff-c90fa6beac4c4a4ca179fcb210e6e096R43
which will then trigger the livereload on line https://github.com/yeoman/generator-angular/pull/680/files#diff-c90fa6beac4c4a4ca179fcb210e6e096R78
which can result in excessive livereloads. So if coffee dont listen for that second line anymore

@marcin-wosinek
Copy link
Contributor Author

Ok, I got it now.

In neither cases we don't need to watch docs files. this will live reload docs for coffee; and this in case of js.

I've tests and in both cases doc page is automatically refreshed when doc is regenerated.

@eddiemonge
Copy link
Member

No, not for the docs. Im talking about normal JS. When a .coffee file is edited, it does not trigger a live reload. CS writing the processed files to the .tmp folder trigger the live reload.

With your change, a live reload is also triggered when the docs are updated. Line 78 of your changes should be removed since line 46 will do the same.

@marcin-wosinek
Copy link
Contributor Author

updated

@eddiemonge eddiemonge added this to the 0.10.0: The Future milestone Jun 5, 2014
},<% } 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?

@eddiemonge
Copy link
Member

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

Ideally these should be available on a different "site". As in not part of the actual site the user is building since end users of the developers project don't/shouldn't need to see the docs for the code part.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants