grunt-ngdocs
grunt-ngdocs copied to clipboard
Inline partials not embeeded correctly
Resolve inline partials multiple tasks bug when generates same index.html multiple times - embedded partials are cleaned.
I don't understand the problem this solves, could you please give an example how to reproduce?
As an example of configuration: options.inlinePartials = true;
Embeds all generated documents as script in body. When you have more than one ngdoc task - then index.html is rewriten from template instead of add new templates after body tag.
Grunt task: tutorial : { src : [ 'content/tutorial/.ngdoc' ], title : 'WLC Tutorial' }, api : { src : [ 'src/core/__/.js', '!src/core//*.spec.js' ], title : 'WLC Core' }, themes : { src : [ 'src/themes//.js', '!src/themes/__/.spec.js' ], title : 'WLC Themes' }
I see the problem. Your proposal works if you always run all ngdoc tasks together and always a new process.
if you build only a sub task there will be partials missing. if you will rebuild for example witch grunt-watch you get duplicate templates in the html.
I think the easiest solution is to keep the partials on the hard drive and always include all. The partials should be ignored in from version control (git). Thats a exercise for the user and could be added to the readme.
What do you think?
I'll test all your mentioned configurations and try to make one single change, will look after. Another one error is when you have 2 tasks and you make both as API only first will render correctly - for others there will be like normal list rendering.