Skip to content

Commit

Permalink
Small clean up and fix main start up script
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Nov 9, 2018
1 parent 2beef9f commit 24afeda
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 56 deletions.
12 changes: 9 additions & 3 deletions packages/local-cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ require('graceful-fs').gracefulify(require('fs'));
require('./server/checkNodeVersion')();

// Transpile the source code
require('./util/setupBabel')();
const babelConfig = require('./babel.config');
require('@babel/register')(babelConfig);

// Export main CLI module
module.exports = require('./cliEntry');
const cli = require('./cliEntry');

if (require.main === module) {
cli.run();
}

module.exports = cli;
2 changes: 0 additions & 2 deletions packages/local-cli/server/runServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

require('../util/setupBabel')();

const Metro = require('metro');

const {Terminal} = require('metro-core');
Expand Down
23 changes: 0 additions & 23 deletions packages/local-cli/util/setupBabel.js

This file was deleted.

28 changes: 0 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@babel/core@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.5.tgz#abb32d7aa247a91756469e788998db6a72b93090"
integrity sha512-vOyH020C56tQvte++i+rX2yokZcRfbv/kKcw+/BCRw/cK6dvsr47aCzm8oC1XHwMSEWbqrZKzZRLzLnq6SFMsg==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.1.5"
Expand Down Expand Up @@ -60,7 +59,6 @@
"@babel/generator@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.5.tgz#615f064d13d95f8f9157c7261f68eddf32ec15b3"
integrity sha512-IO31r62xfMI+wBJVmgx0JR9ZOHty8HkoYpQAjRWUGG9vykBTlGHdArZ8zoFtpUu2gs17K7qTl/TtPpiSi6t+MA==
dependencies:
"@babel/types" "^7.1.5"
jsesc "^2.5.1"
Expand Down Expand Up @@ -222,7 +220,6 @@
"@babel/helpers@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.5.tgz#68bfc1895d685f2b8f1995e788dbfe1f6ccb1996"
integrity sha512-2jkcdL02ywNBry1YNFAH/fViq4fXG0vdckHqeJk+75fpQ2OH+Az6076tX/M0835zA45E0Cqa6pV5Kiv9YOqjEg==
dependencies:
"@babel/template" "^7.1.2"
"@babel/traverse" "^7.1.5"
Expand All @@ -243,7 +240,6 @@
"@babel/parser@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.5.tgz#20b7d5e7e1811ba996f8a868962ea7dd2bfcd2fc"
integrity sha512-WXKf5K5HT6X0kKiCOezJZFljsfxKV1FpU8Tf1A7ZpGvyd/Q4hlrJm2EwoH2onaUq3O4tLDp+4gk0hHPsMyxmOg==

"@babel/plugin-external-helpers@^7.0.0":
version "7.0.0"
Expand All @@ -254,7 +250,6 @@
"@babel/plugin-proposal-async-generator-functions@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce"
integrity sha512-Fq803F3Jcxo20MXUSDdmZZXrPe6BWyGcWBPPNB/M7WaUYESKDeKMOGIxEzQOjGSmW/NWb6UaPZrtTB2ekhB/ew==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-remap-async-to-generator" "^7.1.0"
Expand All @@ -281,7 +276,6 @@
"@babel/plugin-proposal-json-strings@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e"
integrity sha512-kfVdUkIAGJIVmHmtS/40i/fg/AGnw/rsZBCaapY5yjeO5RA9m165Xbw9KMOu2nqXP5dTFjEjHdfNdoVcHv133Q==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-json-strings" "^7.0.0"
Expand Down Expand Up @@ -317,7 +311,6 @@
"@babel/plugin-proposal-unicode-property-regex@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33"
integrity sha512-tM3icA6GhC3ch2SkmSxv7J/hCWKISzwycub6eGsDrFDgukD4dZ/I+x81XgW0YslS6mzNuQ1Cbzh5osjIMgepPQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
Expand All @@ -326,7 +319,6 @@
"@babel/plugin-syntax-async-generators@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c"
integrity sha512-im7ged00ddGKAjcZgewXmp1vxSZQQywuQXe2B1A7kajjZmDeY/ekMPmWr9zJgveSaQH0k7BcGrojQhcK06l0zA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

Expand Down Expand Up @@ -357,7 +349,6 @@
"@babel/plugin-syntax-json-strings@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd"
integrity sha512-UlSfNydC+XLj4bw7ijpldc1uZ/HB84vw+U6BTuqMdIEmz/LDe63w/GHtpQMdXWdqQZFeAI9PjnHe/vDhwirhKA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

Expand Down Expand Up @@ -427,7 +418,6 @@
"@babel/plugin-transform-block-scoping@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.1.5.tgz#3e8e0bc9a5104519923302a24f748f72f2f61f37"
integrity sha512-jlYcDrz+5ayWC7mxgpn1Wj8zj0mmjCT2w0mPIMSwO926eXBRxpEgoN/uQVRBfjtr8ayjcmS+xk2G1jaP8JjMJQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
lodash "^4.17.10"
Expand Down Expand Up @@ -460,7 +450,6 @@
"@babel/plugin-transform-dotall-regex@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58"
integrity sha512-00THs8eJxOJUFVx1w8i1MBF4XH4PsAjKjQ1eqN/uCH3YKwP21GCKfrn6YZFZswbOk9+0cw1zGQPHVc1KBlSxig==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
Expand All @@ -469,7 +458,6 @@
"@babel/plugin-transform-duplicate-keys@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86"
integrity sha512-w2vfPkMqRkdxx+C71ATLJG30PpwtTpW7DDdLqYt2acXU7YjztzeWW2Jk1T6hKqCLYCcEA5UQM/+xTAm+QCSnuQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

Expand Down Expand Up @@ -515,7 +503,6 @@
"@babel/plugin-transform-modules-amd@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8"
integrity sha512-wt8P+xQ85rrnGNr2x1iV3DW32W8zrB6ctuBkYBbf5/ZzJY99Ob4MFgsZDFgczNU76iy9PWsy4EuxOliDjdKw6A==
dependencies:
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
Expand All @@ -531,23 +518,20 @@
"@babel/plugin-transform-modules-systemjs@^7.0.0":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0"
integrity sha512-PvTxgjxQAq4pvVUZF3mD5gEtVDuId8NtWkJsZLEJZMZAW3TvgQl1pmydLLN1bM8huHFVVU43lf0uvjQj9FRkKw==
dependencies:
"@babel/helper-hoist-variables" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-transform-modules-umd@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8"
integrity sha512-enrRtn5TfRhMmbRwm7F8qOj0qEYByqUvTttPEGimcBH4CJHphjyK1Vg7sdU7JjeEmgSpM890IT/efS2nMHwYig==
dependencies:
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-transform-new-target@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a"
integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

Expand Down Expand Up @@ -643,7 +627,6 @@
"@babel/plugin-transform-typeof-symbol@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9"
integrity sha512-1r1X5DO78WnaAIvs5uC48t41LLckxsYklJrZjNKcevyz83sF2l4RHbw29qrCPr/6ksFsdfRpT/ZgxNWHXRnffg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

Expand All @@ -665,7 +648,6 @@
"@babel/preset-env@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.5.tgz#a28b5482ca8bc2f2d0712234d6c690240b92495d"
integrity sha512-pQ+2o0YyCp98XG0ODOHJd9z4GsSoV5jicSedRwCrU8uiqcJahwQiOq0asSZEb/m/lwyu6X5INvH/DSiwnQKncw==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
Expand Down Expand Up @@ -712,15 +694,13 @@
"@babel/preset-flow@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0.tgz#afd764835d9535ec63d8c7d4caf1c06457263da2"
integrity sha512-bJOHrYOPqJZCkPVbG1Lot2r5OSsB+iUOaxiHdlOeB1yPWS6evswVHwvkDLZ54WTaTRIk89ds0iHmGZSnxlPejQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-flow-strip-types" "^7.0.0"

"@babel/register@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827"
integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g==
dependencies:
core-js "^2.5.7"
find-cache-dir "^1.0.0"
Expand Down Expand Up @@ -755,7 +735,6 @@
"@babel/traverse@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.5.tgz#5aafca2039aa058c104cf2bfeb9fc4a857ccbca9"
integrity sha512-eU6XokWypl0MVJo+MTSPUtlfPePkrqsF26O+l1qFGlCKWwmiYAYy2Sy44Qw8m2u/LbPCsxYt90rghmqhYMGpPA==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.1.5"
Expand All @@ -778,7 +757,6 @@
"@babel/types@^7.1.5":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.5.tgz#12fe64e91a431234b7017b4227a78cc0eec4e081"
integrity sha512-sJeqa/d9eM/bax8Ivg+fXF7FpN3E/ZmTrWbkk6r+g7biVYfALMnLin4dKijsaqEhpd2xvOGfQTkQkD31YCVV4A==
dependencies:
esutils "^2.0.2"
lodash "^4.17.10"
Expand Down Expand Up @@ -1066,7 +1044,6 @@ babel-code-frame@^6.26.0:
[email protected]:
version "7.0.0-bridge.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==

babel-core@^6.0.0, babel-core@^6.26.0:
version "6.26.3"
Expand Down Expand Up @@ -1336,7 +1313,6 @@ browser-resolve@^1.11.3:
browserslist@^4.1.0:
version "4.3.4"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.4.tgz#4477b737db6a1b07077275b24791e680d4300425"
integrity sha512-u5iz+ijIMUlmV8blX82VGFrB9ecnUg5qEt55CMZ/YJEhha+d8qpBfOFuutJ6F/VKRXjZoD33b6uvarpPxcl3RA==
dependencies:
caniuse-lite "^1.0.30000899"
electron-to-chromium "^1.3.82"
Expand Down Expand Up @@ -1399,7 +1375,6 @@ camelcase@^4.1.0:
caniuse-lite@^1.0.30000899:
version "1.0.30000907"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000907.tgz#0b9899bde53fb1c30e214fb12402361e02ff5c42"
integrity sha512-No5sQ/OB2Nmka8MNOOM6nJx+Hxt6MQ6h7t7kgJFu9oTuwjykyKRSBP/+i/QAyFHxeHB+ddE0Da1CG5ihx9oehQ==

capture-exit@^1.2.0:
version "1.2.0"
Expand Down Expand Up @@ -1814,7 +1789,6 @@ [email protected]:
electron-to-chromium@^1.3.82:
version "1.3.83"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.83.tgz#74584eb0972bb6777811c5d68d988c722f5e6666"
integrity sha512-DqJoDarxq50dcHsOOlMLNoy+qQitlMNbYb6wwbE0oUw2veHdRkpNrhmngiUYKMErdJ8SJ48rpJsZTQgy5SoEAA==

encodeurl@~1.0.1, encodeurl@~1.0.2:
version "1.0.2"
Expand Down Expand Up @@ -3295,7 +3269,6 @@ [email protected]:
js-levenshtein@^1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e"
integrity sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow==

"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
Expand Down Expand Up @@ -3979,7 +3952,6 @@ node-pre-gyp@^0.10.0:
node-releases@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.3.tgz#3414ed84595096459c251699bfcb47d88324a9e4"
integrity sha512-ZaZWMsbuDcetpHmYeKWPO6e63pSXLb50M7lJgCbcM2nC/nQC3daNifmtp5a2kp7EWwYfhuvH6zLPWkrF8IiDdw==
dependencies:
semver "^5.3.0"

Expand Down

0 comments on commit 24afeda

Please sign in to comment.