Open fitzgen opened 5 years ago
Wen I was experimenting with the generated package.json to try to find a workaround to #663, I found that the .gitignore that is generated is also interpreted by npm as an implicit file exclusion list. Removing the "files" key entirely results in the archive only containing the README and license files.
after discussion in the the rustwasm meeting last week, we've opted to continue using the files key but to populate it with the set of the files found in pkg/
at time of calling wasm-pack publish
.
Any progress here? It looks important becase it prevents inline snippets (which is a very cool feature itself) from being published by default. The workaround is to rm pkg/.gitignore pkg/package.json
and to provide your own package.json
Any progress here?
I am using this workaround to add additional files to be published, after wasm-pack build
:
jq '.files += ["somefile.js"]' pkg/package.json > tmp.json && mv tmp.json pkg/package.json
Built-in support for adding custom files would be great!
From https://github.com/rustwasm/wasm-pack/pull/556