diff --git a/README.md b/README.md index eadacc543..5f7768c16 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Installation ```sh -npm install -g typescript-node +npm install -g ts-node # Make sure you install your TypeScript-compatible compiler. npm install -g typescript @@ -43,7 +43,7 @@ ts-node -p '"Hello, world!"' **With Mocha** ``` -mocha test.ts --require typescript-node/register src/**/*.spec.ts +mocha test.ts --require ts-node/register src/**/*.spec.ts ``` **With Tape:** @@ -55,10 +55,10 @@ ts-node tape src/**/*.spec.ts ### Using TypeScript With Node Programmatically ```js -require('typescript-node').register({ /* options */ }) +require('ts-node').register({ /* options */ }) // Or using the shortcut file. -require('typescript-node/register') +require('ts-node/register') ``` ### Loading `tsconfig.json` @@ -82,11 +82,11 @@ ts-node --compiler ntypescript --project src --ignoreWarnings 2304 hello-world.t MIT -[npm-image]: https://img.shields.io/npm/v/typescript-node.svg?style=flat -[npm-url]: https://npmjs.org/package/typescript-node -[downloads-image]: https://img.shields.io/npm/dm/typescript-node.svg?style=flat -[downloads-url]: https://npmjs.org/package/typescript-node -[travis-image]: https://img.shields.io/travis/blakeembrey/typescript-node.svg?style=flat -[travis-url]: https://travis-ci.org/blakeembrey/typescript-node -[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/typescript-node.svg?style=flat -[coveralls-url]: https://coveralls.io/r/blakeembrey/typescript-node?branch=master +[npm-image]: https://img.shields.io/npm/v/ts-node.svg?style=flat +[npm-url]: https://npmjs.org/package/ts-node +[downloads-image]: https://img.shields.io/npm/dm/ts-node.svg?style=flat +[downloads-url]: https://npmjs.org/package/ts-node +[travis-image]: https://img.shields.io/travis/blakeembrey/ts-node.svg?style=flat +[travis-url]: https://travis-ci.org/blakeembrey/ts-node +[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/ts-node.svg?style=flat +[coveralls-url]: https://coveralls.io/r/blakeembrey/ts-node?branch=master diff --git a/package.json b/package.json index 70d1ee871..622bb5b4a 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,14 @@ { - "name": "typescript-node", + "name": "ts-node", "version": "0.1.2", "preferGlobal": true, "description": "TypeScript execution environment for node", - "main": "dist/typescript-node.js", + "main": "dist/ts-node.js", "bin": { "ts-node": "bin.js" }, "files": [ "dist/", - "typescript-node.d.ts", "bin.js", "register.js", "LICENSE" @@ -21,7 +20,7 @@ "test-spec": "mocha dist/**/*.spec.js -R spec --bail", "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- dist/**/*.spec.js -R spec --bail", "test": "npm run build && npm run lint && npm run test-cov", - "bump-version": "FILE=\"src/typescript-node.ts\"; if [ \"$(git status --porcelain | grep \"^ M \"$FILE)\" = \"\" ]; then VERSION=$(node -p \"require('./package.json').version\") && sed \"s/VERSION = '\\([0-9]*\\.[0-9]*\\.[0-9]*\\)'/VERSION = '\"$VERSION\"'/\" $FILE > .tmp.ts && mv .tmp.ts $FILE && git add $FILE; fi", + "bump-version": "FILE=\"src/ts-node.ts\"; if [ \"$(git status --porcelain | grep \"^ M \"$FILE)\" = \"\" ]; then VERSION=$(node -p \"require('./package.json').version\") && sed \"s/VERSION = '\\([0-9]*\\.[0-9]*\\.[0-9]*\\)'/VERSION = '\"$VERSION\"'/\" $FILE > .tmp.ts && mv .tmp.ts $FILE && git add $FILE; fi", "prepublish": "npm run build" }, "pre-commit": [ @@ -30,7 +29,7 @@ ], "repository": { "type": "git", - "url": "git://github.com/blakeembrey/typescript-node.git" + "url": "git://github.com/blakeembrey/ts-node.git" }, "keywords": [ "typescript", @@ -47,9 +46,9 @@ }, "license": "MIT", "bugs": { - "url": "https://github.com/blakeembrey/typescript-node/issues" + "url": "https://github.com/blakeembrey/ts-node/issues" }, - "homepage": "https://github.com/blakeembrey/typescript-node", + "homepage": "https://github.com/blakeembrey/ts-node", "devDependencies": { "chai": "^3.0.0", "istanbul": "^0.3.17", diff --git a/src/bin/ts-node.ts b/src/bin/ts-node.ts index c13f26a7a..0aeeb9518 100644 --- a/src/bin/ts-node.ts +++ b/src/bin/ts-node.ts @@ -7,7 +7,7 @@ import extend = require('xtend') import minimist = require('minimist') import { diffLines } from 'diff' import { createScript } from 'vm' -import { register, VERSION, TypeScriptError, getFile, getVersion } from '../typescript-node' +import { register, VERSION, TypeScriptError, getFile, getVersion } from '../ts-node' interface Argv { eval?: string diff --git a/src/typescript-node.spec.ts b/src/ts-node.spec.ts similarity index 98% rename from src/typescript-node.spec.ts rename to src/ts-node.spec.ts index 48b09ecca..ec85e9e8e 100644 --- a/src/typescript-node.spec.ts +++ b/src/ts-node.spec.ts @@ -2,7 +2,7 @@ import { expect } from 'chai' import { exec } from 'child_process' import { join } from 'path' import proxyquire = require('proxyquire') -import { register, VERSION } from './typescript-node' +import { register, VERSION } from './ts-node' register() diff --git a/src/typescript-node.ts b/src/ts-node.ts similarity index 100% rename from src/typescript-node.ts rename to src/ts-node.ts diff --git a/tsconfig.json b/tsconfig.json index fa9b40d51..0868eb6b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,8 @@ "sourceMap": true }, "files": [ - "src/typescript-node.ts", - "src/typescript-node.spec.ts", + "src/ts-node.ts", + "src/ts-node.spec.ts", "src/bin/ts-node.ts", "typings/tsd.d.ts", "src/typings/node.d.ts",