@yashxdev/commons
v1.0.5
Published
1. Create folder `mkdir folder cd folder` 2. Run `npm init -y` to get bootstrap it will generate the `package.json` file. 3. Run `tsc --init` it will create the `tsconfig.json` file. 4. Goto `tsconfig.json` file and set `rootdir = "src"`, `outdir ="dist"
Readme
How to create common module publish on npmjs.com
- Create folder
mkdir folder cd folder - Run
npm init -yto get bootstrap it will generate thepackage.jsonfile. - Run
tsc --initit will create thetsconfig.jsonfile. - Goto
tsconfig.jsonfile and setrootdir = "src",outdir ="dist"anddeclaration = true. - Goto
package.jsonfile and change the name toyour_npmjs_username/module_nameand change themainpath tosrc/index.js. - Create
index.tsinsidesrcfolder. - create
.npmignorefile andsrc
To Publish
- Run
cd folder - Run
npm loginin the terminal - Enter username and password to login.
- Run
npm publish --access=public - Done Happy coding!!
