diff --git a/README.md b/README.md index 6bb9eb338..b745aa147 100644 --- a/README.md +++ b/README.md @@ -5,22 +5,23 @@ [![Build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url] -> TypeScript execution environment for node. +> TypeScript execution environment for node. **Works with `typescript@>=1.5`**. ## Installation -``` +```sh npm install -g typescript-node -``` -TypeScript is defined as a `peerDependency`. You may have to install it alongside `typescript-node`. +# Make sure you install your TypeScript-compatible compiler. +npm install -g typescript +``` ## Features * Execute TypeScript with node * Interactive REPL * Execute (and print) TypeScript inline -* Supports Source Maps +* Supports source maps * Supports `tsconfig.json` ## Usage @@ -42,7 +43,13 @@ ts-node -p '"Hello, world!"' **With Mocha** ``` -mocha test.ts --require typescript-node/register +mocha test.ts --require typescript-node/register src/**/*.spec.ts +``` + +**With Tape:** + +``` +ts-node tape src/**/*.spec.ts ``` ### Using TypeScript With Node Programmatically @@ -72,7 +79,7 @@ ts-node --compiler ntypescript --configFile tsconfig.json --ignoreWarnings 2304 ## Issues -* REPL currently does not work over each execution [#1](https://github.com/blakeembrey/typescript-node/issues/1) +* REPL is not working over each execution [#1](https://github.com/blakeembrey/typescript-node/issues/1) * Code coverage information does not work with istanbul [#2](https://github.com/blakeembrey/typescript-node/issues/2) ## License diff --git a/package.json b/package.json index 93519323c..2f0fe4a87 100644 --- a/package.json +++ b/package.json @@ -32,9 +32,6 @@ "type": "git", "url": "git://github.com/blakeembrey/typescript-node.git" }, - "typescript": { - "definition": "typescript-node.d.ts" - }, "keywords": [ "typescript", "node", @@ -61,9 +58,6 @@ "pre-commit": "^1.0.10", "typescript": "^1.5.3" }, - "peerDependencies": { - "typescript": "^1.5.0" - }, "dependencies": { "arrify": "^1.0.0", "commander": "^2.8.1", diff --git a/typescript-node.d.ts b/typescript-node.d.ts deleted file mode 100644 index 2e3341c85..000000000 --- a/typescript-node.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'typescript-node' { - import TypeScriptNode = require('dist/typescript-node') - - export = TypeScriptNode -}