typescript-assistant
Combines and integrates professional Typescript tools into your project
Last updated 11 days ago by jvanoostveen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install typescript-assistant 
SYNC missed versions from official npm registry.

Introduction

While you write TypeScript code, you want it to compile, tests to succeed, code coverage to be upheld and the code should conform to formatting and linting rules. There are already great tools that help you do this. But running them manually can be time-consuming.

In order to be more productive, we ended up creating TypeScript Assistant, that takes care of running the right tools at the right time.

  • Before commit: Check formatting and linting
  • Before push: Compile, run unit test and check coverage
  • After pull: Update packages

It also adds npm scripts to:

  • Fix formatting and linting (npm run fix)
  • Release to npm (npm run release)
  • Run all tools on save in the background (npm run assist)
  • Open code coverage (npm run coverage-show)
  • Run continuous integration (npm run ci)
  • Clean (npm run clean)

Read about the philosophy behind TypeScript Assistant on our blog.

Getting started

You can try TypeScript Assistant on a new project by running

git init && npm init && npm install typescript-assistant && ./node_modules/.bin/tsa init

On existing TypeScript projects, you can just run

npm install typescript-assistant && npm dedupe && ./node_modules/.bin/tsa init

TypeScript Assistant will not overwrite any configuration you already have.

Configuration

Not everything is configurable in TypeScript Assistant.

  • /dist contains artifacts that get distributed in a release. It is excluded from source control.
  • /build contains build output and temporary artifacts. It is excluded from source control.
  • /test contains (unit)tests written in mocha

TypeScript Assistant enforces \n as end-of-line on every platform. It does not have a configuration file of is own, it lets the underlying tools use their own configuration files. tsa init prepares these files as follows:

  • .editorconfig - End-of-line and tab size set to 2 spaces
  • .gitattributes - End-of-line
  • .gitignore - Exclude non-source files
  • .npmignore - Configure what gets packaged, only /dist and README.md
  • package.json - Adds scripts for git hooks and tasks provided by TypeScript Assistant. Also contains configuration for nyc (code coverage)
  • src/tsconfig.json - Strict TypeScript configuration for sources. Output is written to /dist
  • tsconfig.json - Lenient TypeScript configuration for unit tests, does not write output. (tests run fine using ts-node)
  • tsfmt.json - End-of-line and tab size
  • tslint.json - Contains the linting rules you prefer. By default it is set to inherit from the AFAS Software rules shipped by TypeScript Assistant. It can be modified to suit your needs
  • tslint.editor.json - Extends tslint.json and disables some rules to make your IDE (vscode/webstorm) easier to work with.

The folder /src is assumed to contain source files, but this can be modified by changing the tsconfig.json files and the nyc section in package.json. All configuration files can be changed as needed.

If you are creating a browser package, you can get inspiration from maquette on how you can put browser bundles in the dist folder using TypeScript Assistant. See the dist task in the package.json.

NOTE

When typescript-assistant cannot find some of its dependencies, it may be required to run npm dedupe which makes sure all required dependencies will be located directly under node_modules of your project

Contributing

We would love to discuss the best practices that TypeScript Assistant is meant to support. To start a discussion you may open an issue. We do not intend to make TypeScript Assistant ultimately flexible to support everyone's needs, but pull requests for improvements are welcome.

Current Tags

  • 0.31.10-0                                ...           dev (a year ago)
  • 0.40.8                                ...           latest (11 days ago)

153 Versions

  • 0.40.8                                ...           11 days ago
  • 0.40.7                                ...           25 days ago
  • 0.40.6                                ...           a month ago
  • 0.40.5                                ...           2 months ago
  • 0.40.4                                ...           2 months ago
  • 0.40.3                                ...           3 months ago
  • 0.40.2                                ...           3 months ago
  • 0.40.1                                ...           3 months ago
  • 0.40.0                                ...           3 months ago
  • 0.39.10                                ...           3 months ago
  • 0.39.9                                ...           4 months ago
  • 0.39.8                                ...           4 months ago
  • 0.39.7                                ...           4 months ago
  • 0.39.6                                ...           4 months ago
  • 0.39.5                                ...           5 months ago
  • 0.39.4                                ...           5 months ago
  • 0.39.3                                ...           5 months ago
  • 0.39.2                                ...           6 months ago
  • 0.39.1                                ...           6 months ago
  • 0.39.0                                ...           6 months ago
  • 0.38.0                                ...           7 months ago
  • 0.37.5                                ...           7 months ago
  • 0.37.4                                ...           8 months ago
  • 0.37.3                                ...           8 months ago
  • 0.37.2                                ...           8 months ago
  • 0.37.1                                ...           8 months ago
  • 0.36.0                                ...           9 months ago
  • 0.35.2                                ...           10 months ago
  • 0.35.1                                ...           10 months ago
  • 0.34.4                                ...           a year ago
  • 0.34.3                                ...           a year ago
  • 0.34.2                                ...           a year ago
  • 0.34.1                                ...           a year ago
  • 0.34.0                                ...           a year ago
  • 0.33.1                                ...           a year ago
  • 0.33.0                                ...           a year ago
  • 0.32.13                                ...           a year ago
  • 0.32.12                                ...           a year ago
  • 0.32.11                                ...           a year ago
  • 0.32.10                                ...           a year ago
  • 0.32.9                                ...           a year ago
  • 0.32.8                                ...           a year ago
  • 0.32.7                                ...           a year ago
  • 0.32.4                                ...           a year ago
  • 0.32.3                                ...           a year ago
  • 0.32.2                                ...           a year ago
  • 0.32.1                                ...           a year ago
  • 0.32.0                                ...           a year ago
  • 0.31.10                                ...           a year ago
  • 0.31.10-0                                ...           a year ago
  • 0.31.10-1                                ...           a year ago
  • 0.31.9                                ...           a year ago
  • 0.31.8                                ...           a year ago
  • 0.31.7                                ...           a year ago
  • 0.31.6                                ...           a year ago
  • 0.31.5                                ...           a year ago
  • 0.31.3                                ...           a year ago
  • 0.31.2                                ...           a year ago
  • 0.31.1                                ...           a year ago
  • 0.31.0                                ...           a year ago
  • 0.30.2                                ...           2 years ago
  • 0.30.1                                ...           2 years ago
  • 0.30.0                                ...           2 years ago
  • 0.29.0                                ...           2 years ago
  • 0.28.0                                ...           2 years ago
  • 0.27.0                                ...           2 years ago
  • 0.26.2                                ...           2 years ago
  • 0.26.1                                ...           2 years ago
  • 0.26.0                                ...           2 years ago
  • 0.25.2                                ...           2 years ago
  • 0.25.1                                ...           2 years ago
  • 0.25.0                                ...           2 years ago
  • 0.24.4                                ...           2 years ago
  • 0.24.3                                ...           2 years ago
  • 0.24.2                                ...           2 years ago
  • 0.24.1                                ...           2 years ago
  • 0.24.0                                ...           2 years ago
  • 0.23.4                                ...           2 years ago
  • 0.23.3                                ...           2 years ago
  • 0.23.2                                ...           2 years ago
  • 0.23.1                                ...           2 years ago
  • 0.23.0                                ...           2 years ago
  • 0.22.4-0                                ...           2 years ago
  • 0.22.3                                ...           2 years ago
  • 0.22.2                                ...           2 years ago
  • 0.22.1                                ...           2 years ago
  • 0.22.0                                ...           2 years ago
  • 0.21.0                                ...           2 years ago
  • 0.20.10                                ...           2 years ago
  • 0.20.9                                ...           2 years ago
  • 0.20.8                                ...           2 years ago
  • 0.20.7                                ...           2 years ago
  • 0.20.6                                ...           2 years ago
  • 0.20.5                                ...           2 years ago
  • 0.20.3                                ...           2 years ago
  • 0.20.2                                ...           2 years ago
  • 0.20.1                                ...           2 years ago
  • 0.20.0                                ...           2 years ago
  • 0.19.0                                ...           2 years ago
  • 0.18.6                                ...           2 years ago
  • 0.18.5                                ...           2 years ago
  • 0.18.4                                ...           2 years ago
  • 0.18.3                                ...           2 years ago
  • 0.18.1                                ...           2 years ago
  • 0.18.0-alpha.1                                ...           2 years ago
  • 0.17.13                                ...           2 years ago
  • 0.17.10                                ...           2 years ago
  • 0.17.9                                ...           2 years ago
  • 0.17.4                                ...           2 years ago
  • 0.17.2                                ...           2 years ago
  • 0.17.1                                ...           2 years ago
  • 0.17.0                                ...           2 years ago
  • 0.16.2                                ...           2 years ago
  • 0.14.5                                ...           2 years ago
  • 0.14.4                                ...           2 years ago
  • 0.14.3                                ...           2 years ago
  • 0.14.2                                ...           2 years ago
  • 0.14.1                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.7                                ...           2 years ago
  • 0.13.6                                ...           2 years ago
  • 0.13.5                                ...           2 years ago
  • 0.13.4                                ...           2 years ago
  • 0.13.3                                ...           2 years ago
  • 0.13.2                                ...           2 years ago
  • 0.13.1                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.1                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.4                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.10.1                                ...           2 years ago
  • 0.10.0                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.10                                ...           3 years ago
  • 0.8.9                                ...           3 years ago
  • 0.8.8                                ...           3 years ago
  • 0.8.7                                ...           3 years ago
  • 0.8.6                                ...           3 years ago
  • 0.8.5                                ...           3 years ago
  • 0.8.4                                ...           3 years ago
  • 0.8.3                                ...           3 years ago
  • 0.8.2                                ...           3 years ago
  • 0.8.1                                ...           3 years ago
  • 0.8.0                                ...           3 years ago
  • 0.7.2                                ...           3 years ago
  • 0.7.1                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.6.10                                ...           3 years ago
  • 0.6.9                                ...           3 years ago
  • 0.6.8                                ...           3 years ago
  • 0.6.7                                ...           3 years ago
  • 0.6.6                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 324
Last Day 0
Last Week 307
Last Month 41
Dependencies (26)
Dev Dependencies (9)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |