shuji
shuji copied to clipboard
Support the --preserve option
Hi First of all, thank you for this project, I feel it could help me re-building more efficient bundles, if I managed to have it work completely :)
Expected behaviour
Trying to have the files with the correct directory structure. The --preserve
option is documented but fails
> npx shuji -v --output-dir OUT_SHUJI $npm_package_config_map --preserve
Invalid option '--preserve' - perhaps you meant '--verbose'?
I checked the code, and indeed this option does not exist :)
Is there another way to have the original files in the original directory structure ?
thank you for your support
Looks like it is something that came in via one of the open PRs, from which I took some useful commits from. I could have a look how to add this feature, but it will take time.. In any case, PR is always welcome!
It's really useful. It would be great to add official support.
Hi @paazmaya. Any news on this one?
@electroma still open for PR that can do this.
I used @mazamachi's version successfully.
If you clone her repo, and checkout the add-preserve-option
branch,
then you can use it with node bin/shuji.js -p
Try: npm install mazamachi/shuji#add-preserve-option -g
@paazmaya This option is really practical, should be included in my humble opinion. @mazamachi please do a PR 🙏🏻
Thanks @brunowego for that tip!
Additionally, on Mac/Unix you can use this command to process all .js.map
files in a folder (dist
)and stick them in one output folder (src
):
find dist -name '*.js.map' -exec shuji {} -o src -p \;
I'm no expert but pieced it together from this excellent answer on Stack Overflow.
For anyone following in future, I summarised all the information here in a gist:
Please try with v0.8.0