Git Product home page Git Product logo

node-ts-boilerplate's Introduction

node-ts-boilerplate

Developer Ready: A comprehensive template. Works out of the box for most Node.js projects.

Instant Value: All basic tools included and configured:

  • TypeScript 4.7+.
  • Using Babel-node for transpilation.
  • ESLint with some initial rules recommendation.
  • Jest for fast unit testing and code coverage.
  • Type definitions for Node.js and Jest.
  • Prettier to enforce consistent code style.
  • NPM scripts for common operations.
  • .editorconfig for consistent file format.
  • Simple example of TypeScript code and unit test.
  • Use all ES6 features (including experimental and proposal).
  • Minimal .env files for environment customization.
  • Clean imports: No relative files path.
  • Zero dependencies: Install your own packages.
  • yarn PM by default.

๐Ÿคฒ Free as in speech: available under the APLv2 license.

Getting Started

This project is intended to be used with the latest Active LTS release of [Node.js][nodejs].

Use as a repository template

To start,

  • Just clone this repository.
  • Copy .env.development.sample to .env.
  • Start adding your code in the src and unit tests in the __tests__ directories.

Clone repository

To clone the repository, use the following commands:

git clone https://github.com/jiifw/node-ts-boilerplate
cd node-ts-boilerplate
yarn

Download latest release

Download and unzip the current main branch or one of the tags:

wget https://github.com/jiifw/node-ts-boilerplate/archive/main.zip -O node-ts-boilerplate.zip
unzip node-ts-boilerplate.zip && rm node-ts-boilerplate.zip

Available Scripts

  • start - Serve built project.
  • clean - remove coverage data, Jest cache, transpiled files and runtime files.
  • prebuild - lint source files and tests before building.
  • build - transpile TypeScript to ES6 (node compatible).
  • build:watch - interactive watch mode to automatically transpile source files.
  • build:debug - interactive watch mode with debugger to automatically transpile source files.
  • build:prod - transpile TypeScript to ES6 for production (minified).
  • lint - lint source files and tests.
  • prettier - reformat files.
  • test - run tests.
  • test:watch - interactive watch mode to automatically re-run tests.

Additional Information

CommonJS Modules

This template uses native CommonJS.

Please do not open issues for questions regarding ESM or TS-Node on this repo.

License

Licensed under the APLv2. See the LICENSE file for details.

node-ts-boilerplate's People

Contributors

blacksmoke26 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.