Giter VIP home page Giter VIP logo

typescript-boilerplate's Introduction

Typescript Boilerplate

Microsoft provide a good template to quick starting the project in 5 minutes, so with this link can be navigate you to good repository https://www.typescriptlang.org/samples/index.html

However, not all repository is made to me, so I construct my boilerplate and get inspired from many boilerplate from microsoft and still a standard from them.

VSCode Workspace Setting

Please take a look at .vscode/settings.json if you need to modify.

Lint

To run TSLint you would run command as below.

npm run tslint

Build

You might also be running some intermediate steps on your JavaScript, such as bundling or using another transpiler like Babel / Webpack with loader or Gulp.

But this project use tsc original command to transpile .ts to .js

This project using tsc command to build and build configuration will be in tsconfig.json

https://www.typescriptlang.org/docs/handbook/tsconfig-json.html

npm run build

and the result will be appeared in ./dist

Run

Dev

npm run serve

Watch

npm run serve:dev

Test

npm run test

Declaration file

If you are a good programmer and you would like to create your own common library, you should define definition type file.

yourtype.d.ts in to ./src/types

This guide is designed to teach you how to write a high-quality TypeScript Declaration File.

Ref: https://www.typescriptlang.org/docs/handbook/declaration-files/library-structures.html

References

https://github.com/Microsoft/TypeScript-Node-Starter

https://github.com/Microsoft/TypeScriptSamples/

typescript-boilerplate's People

Contributors

iamgoangle avatar

Watchers

James Cloos 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.