Closed swey closed 7 years ago
I guess https://github.com/unic/estatico/blob/develop/gulp/html/default.js#L79-L112 does not work for the index since it requires globs instead of specific files.
One approach would be building the index file every time something changes. However, we have projects with so many modules that it takes multiple seconds to build the index (or loading index.data.js
as a matter of fact).
I usually just save index.hbs
manually since it didn't have a better idea so far...
On second thought: Always rebuilding the index would probably be a good default. In case of performance issues this could be disabled manually.
I slightly modified the issue: Also the rebuilding of the pages is broken.
For everyone running into the same problem as long there is no fix:
--skipHtmlDependencyGraph
is a possibility to disable the dependency graph and make a full rebuild every time
I cannot reproduce the issue with pages not being rebuilt (e.g. changing demo/modules/teaser/teaser.hbs
will rebuild demo/pages/page/page.html
for me). What does your page look like?
Ok, figured out the problem:
{{> modules/one/one modules.one }}
{{> "modules/two/two" modules.two }}
The version without the quotes is not working (that's the one we are using)
PR #41 has a more flexible pattern.
The only remaining problem is that it's not working for modules that are used in the layout.hbs
(like a header), but for that case I just would recommend using --skipHtmlDependencyGraph
while developing such modules.
The pages do not rebuild when their used modules are modified
The index.hbs will also not rebuild because of the new partial rebuilds. -- Newly added pages or modules will not become visible -- Renamings or other meta data changes will not become visible