1.0.1 • Published 2 years ago
miguel-malqui-calculator v1.0.1
miguel-malqui-calculator
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/**/*"]
publish
npm publish