Skip to content

Commit

Permalink
REMOVE need for babel-register in our CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Aug 20, 2019
1 parent 87ad181 commit 4e9f9bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions lib/cli/bin/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#!/usr/bin/env node
const path = require('path');
#!/usr/bin/env node -r esm

require('@babel/register')({
// see https://github.com/babel/babel/issues/7701#issuecomment-389720069
cwd: path.resolve(__dirname, '..'),
only: [new RegExp(`(@storybook|lib)${path.sep === '\\' ? '\\\\' : path.sep}cli`)],
});
require('./generate');
import './generate';
2 changes: 1 addition & 1 deletion lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"dependencies": {
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.0.0",
"@storybook/codemod": "5.2.0-beta.37",
"chalk": "^2.4.1",
"commander": "^2.19.0",
"core-js": "^3.0.1",
"cross-spawn": "^6.0.5",
"esm": "3.2.25",
"didyoumean": "^1.2.1",
"envinfo": "^7.3.1",
"fs-extra": "^8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11768,7 +11768,7 @@ eslint@^5.10.0, eslint@^5.14.1, eslint@^5.16.0:
table "^5.2.3"
text-table "^0.2.0"

esm@^3.2.25, esm@^3.2.4:
esm@3.2.25, esm@^3.2.25, esm@^3.2.4:
version "3.2.25"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
Expand Down

0 comments on commit 4e9f9bd

Please sign in to comment.