digilocker-npm-module
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Publishing node module in openForge

commands to push

  1. init git
  2. set origin

Npm command

  1. npm init/ npm init -y (to init the npm and set package.json file)
  2. code the index or the main file of the project (index or the main file)
  3. run npm run build
  4. npm login
  5. npm whoami *check the id is correct or not
  6. npm publish

Note

I had used typescript hence:

  1. run npm i -D typescript in terminal after npm init

  2. add tsconfig.json file with configurations and :-

    • add "include": ["folder-name"] used to give the folde name to be compiled
    • add "exclude": ["not-required-folder-names"] like node_modules, test files name
  3. in package.json

  • change *scripts* :-
    • add "build":"tsc" for typescript
    • add "prepare": "npm run build" to prepare the package file for publishing
  • add at the end "files" : ["/lib/**/"] *for pushing only the lib file that was build after npm build on the npm registery
    • or can create a new file .npmignore
  • add "types" : " .d.ts", it tells where the decleration file is
  • Note Don't forget to check the index,js file path

Readme

Keywords

none

Package Sidebar

Install

npm i digilocker-npm-module

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

2.87 kB

Total Files

5

Last publish

Collaborators

  • dazlingmonster