- npm init
- Edit package.json data
- install required packages
- build your package
- npm run build
- Test your package:
- npm pack (publishing package locally, it created tgz file,)
- npm install < path_to_package_where_it_was_created >
- run code in cli: node < file_name >.js
- run in index.html
- npm install -g browserify
- browserify index.js -o bundle.js (this will create fill with all required packages)
- import created file: <script src="bundle.js"></script>
- Publish package:
- npm adduser
- npm run build
- Push changes to git repository
- npm publish (ast line returned is name of your package)
- Update packages
- npm adduser
- npm run build
- Push changes to git repository
- Update version
- npm version patch (Increment the patch version 1.0.0 -> 1.0.1)
- npm version minor (1.0.0 -> 1.1.0)
- npm version major (1.0.0 -> 2.0.0)
- npm publish (ast line returned is name of your package)
test-npm-package-test-string
0.2.0 • Public • PublishedPackage Sidebar
Install
npm i test-npm-package-test-string
Repository
Homepage
Weekly Downloads
0
Version
0.2.0
License
MIT
Unpacked Size
35.1 kB
Total Files
10