Gers2017 / ts-tipi

Cli tool to quickly bootstrap typescript projects in Node.js

Home Page:https://www.npmjs.com/package/ts-tipi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ts-tipi 🐺

A cli tool to quickly create Typescript Projects in Node.js

Table of contents

Quick start

Create a new project

npx ts-tipi

Pick a template

  • ts-template
  • express
  • apollo-server

Access your project

cd <your-project-name>

Install the dependencies

npm i
# or 
yarn

Dev command

npm run dev
#or
yarn dev

Template Options

Every template comes with:

  • typescript
  • ts-node
  • ts-node-dev
  • nodemon
  • @types/node
  • prettier

List of commands

    "start": "node ./dist/index.js",
    "start:ts": "ts-node ./src/index.ts",
    "ts:build": "tsc",
    "ts:watch": "tsc --watch",
    "ts:nodemon": "nodemon ./dist/index.js",
    "dev": "ts-node-dev --respawn ./src/index.ts",
    "dev:nodemon": "nodemon ./src/index.ts"

Basic Usage

To run ts-node-dev

npm run dev 
#or
yarn dev

To run nodemon watching ts files

npm run dev:nodemon
#or
yarn dev:nodemon

To run Typescript files using ts-node

npm run start:ts
# or
yarn start:ts

To transpile to Javascript

npm run ts:build 
#or
yarn ts:build

Then to run the compiled js files

npm run start
#or
yarn start

Tsc watch and nodemon setup

Watch for changes in src/index.ts

npm run ts:watch
#or
yarn ts:watch

Watch for changes in dist/index.js

npm run ts:nodemon
#or
yarn ts:nodemon

About

Cli tool to quickly bootstrap typescript projects in Node.js

https://www.npmjs.com/package/ts-tipi

License:MIT License


Languages

Language:JavaScript 91.5%Language:TypeScript 8.5%