dum3ng / study-issues

0 stars 0 forks source link

publish npm package #11

Closed dum3ng closed 5 years ago

dum3ng commented 5 years ago

Encounter some issue when publish a scoped package to npm registry.

publish scoped package with public access

By default if we want to publish a scoped package to npm registry, it is assumed as private access. Add an option to force public.

npm publish --access=public

dist folder is not included

By default npm will use the .gitignore file to exclude files/folders if a .npmignore file not present. If the dist is in .gitignore, then npm will also exclude it. Create a .npmignore file and not include the dist folder

touch .npmignore