@kanztickets/common v1.0.31
Login to npm in command line terminal npm login
Install package for project npm i del-cli tsc --save-dev
change tsconfig.json uncomment declaration and outdir properties
Create build folder mkdir build
change file package.json by adding: "main": "./build/index.js" // specify file index.js for lookup when import from other file "types": "./build/index.d.ts" // this file was created when we npm run build. This file contains type of functions in index.js "files": "build/*/" "scripts": { "clean": "del ./build/*", // to clean file "build": "npm run clean && tsc" // clean file when build again }
Flow This common module
change config in tsconfig.json to specify out dir build, and create index.d.ts for types build current source from ts to js file in /build specify index.js for the external import specify index.d.ts for type definition
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago