Exclude directory from "h5p pack" command
Submitted by mstimvol on Tue, 01/19/2021 - 14:42
Forums:
Hi,
I'm new to H5P developing. At the moment I wrote my first own widget (based on the awesome) tutorial for the spectrum color picker. Everything works well, but I'm a confused how I can exclude dev-dependencies when I run "h5p pack".
So my directory structure is as follows:
h5p-widget/ ├─ node_modules/ ├─ scripts/ ├─ package.json ├─ library.json ├─ package-lock.json ├─ README.md
Now, when I run
h5p pack -r h5p-widget
It generates a h5p file as expected but the problem is that the h5p-file also includes the node_modules directory but in my case the node_modules directory contains dev-dependencies only. So is there any way to exclude this directory?
otacke
Tue, 01/19/2021 - 16:49
Permalink
Hi!You'd want to create a
Hi!
You'd want to create a file called .h5pignore that works just like .gitignore files. This one should cover most cases ...
Best,
Oliver
mstimvol
Wed, 01/20/2021 - 09:00
Permalink
Awesome, works perfectly.
Awesome, works perfectly. Thank you very much, Oliver!
otacke
Wed, 01/20/2021 - 11:31
Permalink
You're welcome! Hope to see
You're welcome! Hope to see some cool new widget to see the light of day soon :-)