Don't create .gitignore in pkg directory
Closes #728 Closes #984, Closes #909 Closes #999. Supersedes #1131, #985
Problematic Behaviour
Currently, wasm-pack generates a .gitignore file in the pkg directory during each build.
Suggested Solution
This PR proposes removing the automatic creation of the .gitignore file without introducing a replacement.
Justification
While many tools generate an appropriate .gitignore during project initialization, it’s relatively uncommon (in my experience) for build tools, like compilers, to create .gitignore files during a build.
Moreover, this behavior has led to several issues, as outlined in the following requests:
- #728
- #984
- #909
- #999
This PR aims to remove the generation of the problematic .gitignore file, addressing and potentially superseding these other PRs:
- #1131
- #985
Changes made
- Remove one line from src/command/utils.rs
- Update documentation in docs/src/commands/build.md
was looking for this, hope it gets merged soon
any progress?
bumping! it seems very strange that this is on by default as it's very easy for a dev to add it themselves and causes issues when we want to version control the autogenerated type files
Would be really nice to see get added, with --no-pack being a thing it's rather annoying to have a custom package.json to then have it get gitignored because of running a wasm-pack build.