test-npm-deploy-dan
v1.0.1
Published
- Verify package name is unique in **package.json** - Specify the *["files"]* field as an array of files and folders to deploy, typically a post-build "dist" folder or similar - Split *["dependencies"]* and *["devDependencies]* - eg. move *typescript
Downloads
2
Readme
Publishing to NPM
- Verify package name is unique in package.json
- Specify the ["files"] field as an array of files and folders to deploy, typically a post-build "dist" folder or similar
- Split ["dependencies"] and ["devDependencies]
- eg. move typescript and @types/ into ["devDependencies]
- Specify the ["publishConfig"]["access"] field as "public" or "private"
- Configure the ["bin"] field for the CLI to be used
- eg. "bin": "dist/index.js" and insert the bin disclaimer in the CLI file (#!/usr/bin/env node)
- Specify ["scripts"]["prepublishOnly"] field as the script to be ran before publishing, typically to build the project
- Commit to git if desired, and ensure that .gitignore is configured
- Finally, run npm publish