Licence
ISC
Version
1.0.3
Deps
0
Size
3 kB
Vulns
0
Weekly
0
A sample repository containing a dead simple module:
// index.js
module.exports = 42
to show how to publish a NPM package, here called: auqlue.
NB: AUQLUE is the acronym for the "Answer to the Ultimate Question of Life, the Universe, and Everything" which is 42 .
Publish to NPM
Ready to publish a new version to NPM registry?
Manually
- bump the
package.jsonversion npm loginif not alreadynpm publish
If successful, you should want to tag the version:
$ git add package.json
$ git commit -m "bump version"
$ git tag v1.0.1
$ git push --tags
Using CI/CD workflow
Pre-requisite:
- Generate a NPM token
- Set it as
NPM_TOKENsecret (inSettings > Secretsand as referenced intocicd.ymlfile)
Then, to release a new version on npm:
- bump the
package.jsonversion - then, create a new realese and wait for the ci/cd publish it :)
