Skip to content

Commit

Permalink
Use babel-env, adds a lockfile, updates ts-node
Browse files Browse the repository at this point in the history
  • Loading branch information
orta authored and alloy committed Jun 13, 2017
1 parent d2f8f90 commit e94d993
Show file tree
Hide file tree
Showing 4 changed files with 1,798 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ npm install --save-dev ts-babel-node [email protected]

Since `ts-babel-node` is a wrapper around `ts-node`, anything you can do with `ts-node` works with `ts-babel-node`. See [`ts-node`'s docs](https://github.com/TypeStrong/ts-node/#usage) for more details.

To configure babel, you can pass in an options object to the appropriate register function or use a [babelrc](http://babeljs.io/docs/usage/babelrc/). All babelrc locations are supported. **Note**: if you use a babelrc, the default babel configuration provided by ts-babel-node will not be used. Simply include the `es2015` preset in your config (or don't, if you don't want it).
To configure babel, you can pass in an options object to the appropriate register function or use a [babelrc](http://babeljs.io/docs/usage/babelrc/). All babelrc locations are supported. **Note**: if you use a babelrc, the default babel configuration provided by ts-babel-node will not be used. Simply include the `env` preset in your config (or don't, if you don't want it).

### Library

Expand Down Expand Up @@ -85,4 +85,4 @@ import 'ts-babel-node/register-babel';
// ...
```

Then use `gulp` normally. Keep in mind that the babel traspiler won't be active in your `gulpfile.ts`, but will be running in all your imports.
Then use `gulp` normally. Keep in mind that the babel transpiler won't be active in your `gulpfile.ts`, but will be running in all your imports.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var outputs = {}; // filename => { code, map }
var baseBabelOpts = { ast: false };

var defaultBabelOpts = {
presets: [ require('babel-preset-es2015') ],
presets: [ require('babel-preset-env') ],
};

exports.registerBabel = registerBabel;
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"ts-babel-node": "bin/ts-babel-node.js"
},
"peerDependencies": {
"typescript": "*",
"ts-node": ">=0.9"
"ts-node": ">=0.9",
"typescript": "*"
},
"devDependencies": {
"@types/bluebird": "^3.0.35",
Expand All @@ -37,14 +37,14 @@
"eslint": "^3.8.1",
"lab": "^13.1.0",
"merge2": "^1.0.2",
"ts-node": "^1.6.0",
"ts-node": "^3.0.6",
"tslint": "^3.15.1",
"tslint-eslint-rules": "^2.1.0",
"typescript": "^2.0.3"
},
"dependencies": {
"babel-core": "^6.9.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-env": "^1.5.2",
"source-map-support": "^0.4.0"
}
}
Loading

0 comments on commit e94d993

Please sign in to comment.