init-ts-template
v0.8.6
Published
TypeScript project template initializer. Like npm init, but for TS. Includes robust configuration for tsconfig.
Readme
Init TS Template
TypeScript project template initializer. Like npm init but for TS. Includes robust configuration for tsconfig.
Requires node >= v22.0.0
Installation
Package Manager
- Globally installs using
pnpm,npmoryarn - Pick your preferred package manager to install the cli globally.
# pnpm
pnpm i -g init-ts-template
# npm
npm i -g init-ts-template
# yarn
yarn global add init-ts-templatePackage Executor
- Downloads and executes using
pnpx,npxoryarn dlx - Pick your preferred package executor to run the cli with
--name {INSERT_NAME}and follow the terminal prompts.
# pnpx
pnpx init-ts-tempalte --name my-ts-project
# npx
npx init-ts-tempalte --name my-ts-project
# yarn dlx
yarn dlx init-ts-tempalte --name my-ts-projectUsage
- Run the
init-ts-templateCLI. - Use the flag
-n/--name {YOUR_PROJECT_NAME}to provide a custom project name. - Follow the terminal prompts.
- The CLI takes lots of arguments. Checkout cli.ts and ts-template.ts for all options.
init-ts-template --name my-ts-projectQuick Install
- To skip the prompts and install a new default project template in one line, use
-sor--skip. - If name not provided using
-n my-ts-projector--name my-ts-project, cli tool will create a new folder calledTBD - Before using
skip, check out the project defaults to make sure you are okay with those settings. Specifically, thetsconfig.jsonsetup:- ESM tsconfig.json
- CommonJS tsconfig.cjs.json
# Default "TBD"
# pnpx
pnpx init-ts-tempalte --skip
# npx
npx init-ts-tempalte --skip
# yarn dlx
yarn dlx init-ts-tempalte --skip
# Custom name "my-ts-project"
# pnpx
pnpx init-ts-tempalte --skip --name my-ts-project
# npx
npx init-ts-tempalte --skip --name my-ts-project
# yarn dlx
yarn dlx init-ts-tempalte --skip --name my-ts-project
# pnpx
# npx
# yarn dlx
Default Settings
- TODO: Provide a detailed breakdown of all the default project settings
