Skip to content

koheitakumi/node-template-with-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boiler template for NodeJS project with TypeScript🎉

  • created: 2020-06-19T13:48:17.539Z
  • updated: 2020-06-19T14:46:29.596Z

Purpose

Boiler Template for NodeJS project with TypeScript.

We can start a new project with this clean template with TypeScript that keep the code better.

Install

  1. Clone this repository. Please replace YOUR_PROJECT_NAME to the real name.

    git clone https://github.com/koheitakumi/node-template-with-typescript.git YOUR_PROJECT_NAME
  2. Install packages.

    npm install
    # or
    yarn install
  3. Rename the project name

    • package.json
      • name
      • version
      • repository
      • author
      • license
    • remove src/index.ts
    • change contents as you like
      • .vscode/settings.json
      • .editorconfig
      • .gitignore
      • .prettierrc.js
      • tsconfig.json
      • README.md
  4. Make your new repository on your Git service like GitHub.

  5. Commit these changes.

    git add .
    git commit -m "first commit"
  6. Push it into your Git repository. Please replace YOUR_GIT_REPOSITORY_URL to your repository URL.

    git remote -v
    git push YOUR_GIT_REPOSITORY_URL master

    or

    git remote add origin YOUR_GIT_REPOSITORY_URL
    git push -u origin master
  • Great! You can start your new Project now!🙌

Usage

Please check the package.json.

Run TypeScript code each time.

npm run dev
# or
yarn dev

Watch code changes.

It's useful when you develop server side application

npm run dev:watch
# or
yarn dev:watch

Clean compiled code in dist.

npm run clean
# or
yarn clean

Run tsc command

npm run tsc
# or
yarn tsc

Build this project into dist for publish.

npm run build
# or
yarn build

Run the built project.

npm run start
# or
yarn start

Execute lint to check your code.

npm run lint
# or
yarn lint

Format your code.

npm run format
# or
yarn format

Stage code on your repository.

npm run precommit
# or
yarn precommit

Preference

About

Boiler template for NodeJS project with TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors