Babel: Make babel-node a standalone package (similar to babel-register)

Created on 6 Feb 2017  ยท  3Comments  ยท  Source: babel/babel

Ref https://twitter.com/thejameskyle/status/827993163348353025

https://unpkg.com/[email protected]/message.js

This would be similar to how we used to have babel-core/register -> babel-register

I guess we don't have to remove babel-node from babel-cli unless we want to make that breaking change..

cc @JonnyBurger (can you transfer me the npm package (@hzoo))


Has PR good first issue outdated

Most helpful comment

Hi @hzoo,

If you don't mind I can pick this up.

All 3 comments

Hi @hzoo,

If you don't mind I can pick this up.

... copy the package.json/npmignore/setup files from another package

Would it be better if the target package is babel-cli?

And before I make the pull request. This what the babel-node folder looks like. Did I miss anything?

.
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ index.js
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ _babel-node.js
โ”‚ย ย  โ”œโ”€โ”€ babel
โ”‚ย ย  โ”œโ”€โ”€ babel-external-helpers.js
โ”‚ย ย  โ””โ”€โ”€ babel-node.js
โ””โ”€โ”€ test
    โ”œโ”€โ”€ fixtures
    โ””โ”€โ”€ index.js

4 directories, 7 files

Would it be better if the target package is babel-cli?

Yeah good idea

Right, whatever is necessary to make it work on it's own. Can check that the necessary deps are in package.json since you might not need everything.

So this means you probably don't need src/babel/* or babel-external-helpers.js, and you'll want the bin folder https://github.com/babel/babel/blob/master/packages/babel-cli/bin/babel-node.js + add bin in package.json

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JonathanRys picture JonathanRys  ยท  3Comments

catamphetamine picture catamphetamine  ยท  3Comments

kobezzza picture kobezzza  ยท  3Comments

hzoo picture hzoo  ยท  3Comments

mathiasbynens picture mathiasbynens  ยท  3Comments