Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this is a fix related to the following conversations:
Process.fork
not being supported on Windows cli#221TL;DR:
hanami dev
and asset compilation doesnt work on windows(the issue where the conversation (mostly) took place is hanami/hanami#1463)
this is part one of likely a few PR's
assets.json
was not being created on windows platforms, nor were assets being appropriately built / hashedthis PR includes 2 fixes which gets the process working on windows:
we are using the
fs-extra
package'swriteJSON
method to write json files (the manifests). this does not create directories if they do not already exist. for some reason this works on *nix systems, but not windows. theoutputJSON
function will create a directory (by defaultpublic/assets
isnt created duringhanami new
).Error when running on windows jprichardson/node-jsonfile#60
file path references were broken all over the place, because turns out
glob.sync
doesnt take anything other than posix format. i introduced a small helper function to convert all paths to use the appropriate path separatorhanami assets compile
now appropriately creates all asset files correctly (althoughhanami dev
andhanami assets watch
still aren't working -> thats a separate issue and a separate incoming PR on a diff repo :) )please lmk what you think!