npm.io
1.0.0 • Published 4 years ago

sumsum

Licence
MIT
Version
1.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
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 link in node module project directory.

  • npm link @scope-name/my-new-npm-package in other developing project

  • npm unlink --no-save @scope-name/my-new-npm-package to unlink

  • npm pack If you want to double check that your package will include only the files you intend it to when published.

  • yarn run build && npm link would 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