omni-utils
Publishing module
- Create repository
- Create an account in https://www.npmjs.com/
- Set tsconfig.json
{ "compilerOptions": { "target": "es5", "module": "commonjs", "lib": ["es2017", "es7", "es6", "dom"], "declaration": true, "outDir": "dist", "strict": true, "esModuleInterop": true }, "exclude": [ "node_modules", "dist" ] } - Set .npmignore
lib - Set .gitignore
node_modules dist/ - Create lib folder, add functions or exports in index.ts
- Build package
npm run build - Publishing and patching:
npm login npm publish npm version patch -m "Version <version> - <message>"
Note
- Ensure changes have been pushed
- Build project before publishing
Version structure
Version <step>.<feature>.<patch>
How to use package
Installation
npm install omni-utils
Updating package
npm update omni-utils