Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Inline partials not embeeded correctly #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

cheplv
Copy link

@cheplv cheplv commented Apr 22, 2016

Resolve inline partials multiple tasks bug when generates same
index.html multiple times - embedded partials are cleaned.

Resolve inline partials multiple tasks bug when generates same
index.html multiple times - embedded partials are cleaned.
@cheplv cheplv changed the title #192 Generate index.html only once Generate index.html only once Apr 22, 2016
@cheplv cheplv changed the title Generate index.html only once Inline partials not embeeded correctly Apr 22, 2016
@m7r
Copy link
Owner

m7r commented Apr 24, 2016

I don't understand the problem this solves, could you please give an example how to reproduce?

@cheplv
Copy link
Author

cheplv commented Apr 25, 2016

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'
}

@m7r
Copy link
Owner

m7r commented Apr 27, 2016

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?

@cheplv
Copy link
Author

cheplv commented Apr 27, 2016

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.

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

Successfully merging this pull request may close these issues.

2 participants