Reputation: 3387
I see a lot of npm modules that require a build/compilation step have a dist/
folder in their repo. Do the authors run the build step before committing manually or is this automated on commit, if so how?
Example repos:
https://github.com/se-panfilov/vue-notifications
https://github.com/ratiw/vuetable-2
https://github.com/hilongjw/vue-progressbar
Is it common to run the build step manually before a commit? How is this enforced?
Upvotes: 0
Views: 70
Reputation: 29436
There are several ways to do this:
Manually run the build commands, commit to git, and also publish to npm.
Commit to git, a CI server picks it up, builds and publishes to npm.
Use git hooks to build before each commit.
Add the build commands to postInstall
step in package.json
, this builds the module after a user has npm
installed it.
Upvotes: 1
Reputation: 133008
The build step is usually not part of a commit but rather before publishing to npm. This can be automated in different ways, for example in a prepublish
script.
Upvotes: 1