It helps to publish your TypeScript libraries to npm.
- compiles your TypeScript code into
outDir
which you defined intsconfig.json
. - changes permissions of binary files
- copy package.json into
outDir
and removeprivate
flag - copy README.md into
outDir
- publish your built files to npm
$ npm install -D ts-publisher
// or
$ yarn add -D ts-publisher
$ npx tsp build
// or
$ yarn tsp build
name | description |
---|---|
-p, --project | specify tsconfig path. The default is <your library>/tsconfig.json |
You need to login npm cli before using the publish task.
$ npx tsp publish
// or
$ yarn tsp publish
name | description |
---|---|
-p, --project | same as build |
-o, --otp | one time password |