tsmill
Unify TypeScript standards across projects in a highly oipinionated way.
Last updated 2 years ago by ryardley .
MIT · Original npm · Tarball · package.json
$ cnpm install tsmill 
SYNC missed versions from official npm registry.

tsmill

Unify TypeScript standards across projects in a highly oipinionated way.

This project installs TypeScript, TSLInt, Jest and Prettier configured according to your organisation's standards so you don't have to.

IMPORTANT NOTE: It is not recommended you use this yet. Having said that you may find it usefull to use for bootstrapping your projects however bare in mind everything is in flux and the current published version may not work at all.

Installation

Eventually this package will work with npm but for now it is only tested using yarn

Start with an empty project

$ yarn init -y

Install the dependency

$ yarn add --dev tsmill

Then run the initialisation script

$ yarn tsm init

This will alter your package.json and add a few scripts.

Configuration

After initialisation you should have a tsmill.json file in your root folder.

This folder controls how building and starting works:

{
  "typescript": [
    "src/server.ts", 
    "src/api.ts"
  ],
  "webpack": [
    "./webpack.config.js"
  ],
  "static": [
    "static"
  ]
}

typescript

Typescript entry points to run upon start.

webpack

Webpack configurations that will be run when build is run.

static

Folders with contents to be copied into build/static.

Server

tsmill comes with it's own development and production server to run your code. Here is how you can use it to serve web content:


// Import the tsmill/server
import server from 'tsmill/server';

// This is an express server that serves up static assets in the deployment folder.
// Deployment folder is determined based on NODE_ENV.
// In production mode the static folder is in `build/static` 
// In development mode the static folder is in `static`
const app = server();

app.listen(3000, () => {
  console.log('Running on 3000');
});

CLI

Build

$ yarn build

Will run the TypeScript compiler on ./src and compile to ./build

Start

$ yarn start

Will start a development server with hot loading.

Format

$ yarn format

Will run prettier on ./src fixing issues in place

Lint

$ yarn lint

Will run tslint on ./src fixing issues in place

Test

$ yarn test

Will run jest over the codebase in ./src running tests within all *.test.ts files.

To setup a watch run

$ yarn test --watch

Current Tags

  • 4.0.2                                ...           latest (2 years ago)

89 Versions

  • 4.0.2                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 3.1.5                                ...           2 years ago
  • 3.1.4                                ...           2 years ago
  • 3.1.3                                ...           2 years ago
  • 3.1.2                                ...           2 years ago
  • 3.1.1                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.74                                ...           2 years ago
  • 2.0.73                                ...           2 years ago
  • 2.0.72                                ...           2 years ago
  • 2.0.71                                ...           2 years ago
  • 2.0.70                                ...           2 years ago
  • 2.0.69                                ...           2 years ago
  • 2.0.68                                ...           2 years ago
  • 2.0.67                                ...           2 years ago
  • 2.0.66                                ...           2 years ago
  • 2.0.65                                ...           2 years ago
  • 2.0.64                                ...           2 years ago
  • 2.0.63                                ...           2 years ago
  • 2.0.62                                ...           2 years ago
  • 2.0.61                                ...           2 years ago
  • 2.0.60                                ...           2 years ago
  • 2.0.59                                ...           2 years ago
  • 2.0.58                                ...           2 years ago
  • 2.0.57                                ...           2 years ago
  • 2.0.56                                ...           2 years ago
  • 2.0.55                                ...           2 years ago
  • 2.0.54                                ...           2 years ago
  • 2.0.53                                ...           2 years ago
  • 2.0.52                                ...           2 years ago
  • 2.0.51                                ...           2 years ago
  • 2.0.50                                ...           2 years ago
  • 2.0.49                                ...           2 years ago
  • 2.0.48                                ...           2 years ago
  • 2.0.47                                ...           2 years ago
  • 2.0.46                                ...           2 years ago
  • 2.0.45                                ...           2 years ago
  • 2.0.44                                ...           2 years ago
  • 2.0.43                                ...           2 years ago
  • 2.0.42                                ...           2 years ago
  • 2.0.41                                ...           2 years ago
  • 2.0.40                                ...           2 years ago
  • 2.0.39                                ...           2 years ago
  • 2.0.38                                ...           2 years ago
  • 2.0.37                                ...           2 years ago
  • 2.0.36                                ...           2 years ago
  • 2.0.35                                ...           2 years ago
  • 2.0.34                                ...           2 years ago
  • 2.0.33                                ...           2 years ago
  • 2.0.32                                ...           2 years ago
  • 2.0.31                                ...           2 years ago
  • 2.0.28                                ...           2 years ago
  • 2.0.24                                ...           2 years ago
  • 2.0.23                                ...           2 years ago
  • 2.0.22                                ...           2 years ago
  • 2.0.21                                ...           2 years ago
  • 2.0.20                                ...           2 years ago
  • 2.0.19                                ...           2 years ago
  • 2.0.18                                ...           2 years ago
  • 2.0.17                                ...           2 years ago
  • 2.0.16                                ...           2 years ago
  • 2.0.15                                ...           2 years ago
  • 2.0.14                                ...           2 years ago
  • 2.0.12                                ...           2 years ago
  • 2.0.11                                ...           2 years ago
  • 2.0.10                                ...           2 years ago
  • 2.0.9                                ...           2 years ago
  • 2.0.8                                ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 89
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |