lab-transform-typescript
transform TypeScript for the lab testing framework
Last updated 3 years ago by garthk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lab-transform-typescript 
SYNC missed versions from official npm registry.

Lab Transform for TypeScript

lab-transform-typescript transforms TypeScript for use with lab, permitting npm test without having to transpile first in a pretest script.

NPM Version

Usage:

  • npm install --save-dev lab-transform-typescript
  • lab --sourcemaps --transform node_modules/lab-transform-typescript

If you'd like typings support for lab and code, also:

  • typings install --save --global github:garthk/lab-transform-typescript/typings-local/lab.d.ts
  • typings install --save --global github:garthk/lab-transform-typescript/typings-local/code.d.ts

The typings for code are thorough. The typings for lab are pretty thin. I'd much appreciate feedback on and pull requests for improvements on either.

Issues:

  • #1 aka hapijs/lab#614: lab --coverage output shows the transpiled JavaScript, not the source TypeScript.

Caveats:

Which version of typescript you get depends on how you installed it:

  • If you installed with npm install as above, you'll get the typescript from your project's node_modules
  • If you used npm link to take a reference to lab-transform-typescript while fixing a bug in it, you'll get the typescript from lab-transform-typescript/node_modules

Environment Variables:

Set DEBUG=* or DEBUG=lab-transform-typescript to see a version report and configuration loading details on stderr.

Set TSCONFIG to override TypeScript's default search for tsconfig.json, as if you'd set -p on the tsc command line.

Change Log:

  • 3.0.0: switched to TypeScript's configuration loader and parser (set TSCONFIG envar to override location)
  • 2.0.0: moved typescript from dependencies to devDependencies for testing and peerDependencies for production use
  • 1.0.1: added more typings for lab
  • 1.0.0: initial release

Current Tags

  • 3.0.1                                ...           latest (3 years ago)

4 Versions

  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 27
This Month 42
Last Day 10
Last Week 20
Last Month 49
Dependencies (1)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |