1.0.0 • Published 4 years ago
sumsum v1.0.0
Structure
- src — this is where we’ll store our ES6 code files.
- dist — this is where we’ll store the transpiled ES5 code.
- We need to install babel dependencies to transpile the ES6 code to ES5.
Test your node module before you publish
npm linkin node module project directory.npm link @scope-name/my-new-npm-packagein other developing projectnpm unlink --no-save @scope-name/my-new-npm-packageto unlinknpm packIf you want to double check that your package will include only the files you intend it to when published.yarn run build && npm linkwould be helpful.
publish to github packages
- go to https://github.com/settings/tokens
- add a new token with
write:packages - create
.npmrc - update fields in
package.json(name & repository field) - run
npm login --scope=@YOUR_GITHUB_USERNAME --registry=https://npm.pkg.github.com - your password is your token.
Ref
1.0.0
4 years ago