-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.0 #19
Conversation
- Fixed: metalsmith-collections are now correctly adjusted to avoid duplicates entries after rebuilds) - Removed: `pattern` option has been remove. Please use the new `paths` option - Added: `paths` option allows you to specify a map to trigger rebuilds (closes [#4](#4) and [#13](#13)) - Added: `log` option to be able to control watcher logs - Added: when a JavaScript file is changed, the corresponding cache in node/iojs cache is refreshed. This is particularly handy when working with plain JavaScript template (eg: react template made with [metalsmith-react](https://github.com/MoOx/metalsmith-react)) Closes #4 Closes #13 Closes #17 Closes #18
Using the paths documented like this doesn't trigger a rebuild of everything:
As you can see here:
When using:
...the partial rebuilds but the source doesn't, of course, so it doesn't update the source with the new partial. Is this intended? I'm trying to get the source to rebuild so it includes the updated partial. |
Recent metalsmith release introduced a breaking change in run() method. So this branch is kind of broken. |
Ok I said some shit previously my bad. This is supposed to work @JoshConley. |
Thanks for the update! Has something changed to make it work? |
No I didn't change anything for now, I was having local changes that make me think something was wrong. |
Yes! Essentially, folders are structured like this:
When the partials change, the watch script recognizes the file changed, but doesn't rebuild the source file. Using this config:
Again, I get the same as I commented above (partials/header.html changed, updating 0 files). When the partial loads, the source should be rebuilt. Same thing happens if I use |
I guess the / is considered to be your metalsmith root amarite ? |
Yup! I don't have access to it at the moment but I can share the build script with you tomorrow. Thanks for your help. |
- paths normalization for rebuild (to prevent rebuild of 0 files?) - brutal cache invalidation (when a js file changed, all js files of metalsmith dir are cleaned) - log prefix is [metalsmith-watch] - execute metalsmith callback when it’s appropriate. tests have been exploded to make them easier to use.
Awesome! Work thank you so much for this! 🎆 |
Changes
duplicates entries after rebuilds)
pattern
option has been remove. Please use the newpaths
option
paths
option allows you to specify a map to trigger rebuilds(closes #4 and
#13)
log
option to be able to control watcher logsnode/iojs cache is refreshed.
This is particularly handy when working with plain JavaScript template
(eg: react template made with
metalsmith-react)
Technical changes
Closes #4
Closes #13
Closes #17
Closes #18