1.0.0 • Published 1 year ago

miguel-malqui-calculator2 v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

calculator2

init package and git

git init
npm init -y

add ts as dev dependency

npm install --save-dev typescript

Add tsconfig.json to compile Typescript

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "declaration": true,
    "outDir": "./lib",
    "strict": true
  },
  "include": ["src"],
  "exclude": ["node_modules", "**/__tests__/*"]
}

Add a build script to package.json

"build" : "tsc"

code

Create a src folder in the root and add index.ts file.

.gitignore

node_modules
/lib

include only build files in the package

Add the files property in package.json

"files": ["lib/**/*"]

Prepare to publish

Add prepare script to package.json. It will run before package is packed and published.

"prepare" : "npm run build"

publish

npm publish

1.0.0

1 year ago