One stop TypeScript libraries and applications boilerplate generator
IMPORTANT: this script will automatically install pnpm
and np
globally
Following are the boilerplate option that are available:
- tslib
- express (coming soon)
- styled-theme (coming soon)
replace the option as above to following command:
npx create-tslibs --option=tslib --folder=your-lib-name
# --folder will be your application / library name
Instead of using npm, we will be using pnpm, publishing to npm for your packages will be using np, since np is not supported for pnpm hence publish.sh will ensure pnpm i
run before np
running
This is a TSDX Extension setup is meant for developing libraries (not apps!) that can be published to NPM. If you’re looking to build a Node app, you could use ts-node-dev
, plain ts-node
, or simple tsc
.
-
Inclusive of scripts to generate flow types
-
Inclusive of scripts to generate multiple modules
-
Setup for airbnb standard (and remove conflicting linting plugins)
This tool is designed for VS Code platform.
Hence I suggest using VS Code as IDE:
The templates are already setup with vscode settings for auto format.
Ensure the following plugins are enabled:
- ESlint (This is setup with airbnb linting convention)
- Prettier
- Add JSDoc Comment
Optional but Recommended:
Recommend using np.
Important Note:
run npm publish
for initial publish before running np
commands
You may run into the following issue:
npm access 2fa-required create-tslibs
npm ERR! code E400