Fix cli entry points

Reviewed By: frantic

Differential Revision: D2565954

fb-gh-sync-id: 6fde9e1dbefd71944e8f857e9a40619bf599ef75
This commit is contained in:
Martín Bigio 2015-10-22 10:11:28 -07:00 committed by facebook-github-bot-6
parent 17ef86d6bb
commit 32aeeea313
6 changed files with 20 additions and 2 deletions

View File

@ -8,6 +8,11 @@
*/
'use strict';
require('../packager/babelRegisterOnly')([
/private-cli\/src/,
/local-cli/
]);
var bundle = require('../private-cli/src/bundle/bundle');
var childProcess = require('child_process');
var Config = require('../private-cli/src/util/Config');

View File

@ -44,7 +44,7 @@
"scripts": {
"test": "NODE_ENV=test jest",
"lint": "eslint Examples/ Libraries/",
"start": "react-native start || true"
"start": "./packager/packager.sh || true"
},
"dependencies": {
"absolute-path": "^0.0.0",

View File

@ -13,5 +13,6 @@ clear
THIS_DIR=$(dirname "$0")
$THIS_DIR/packager.sh
echo "Process terminated. Press <enter> to close the window"
read

View File

@ -24,7 +24,7 @@
"scripts": {
"test": "jest",
"lint": "node linter.js Examples/",
"start": "react-native start"
"start": "./packager.sh"
},
"dependencies": {
"wordwrap": "^1.0.0"

11
packager/packager.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
THIS_DIR=$(dirname "$0")
node "$THIS_DIR/../local-cli/cli.js" start "$@"

View File

@ -43,6 +43,7 @@ const Config = {
: {};
cachedConfig = Object.assign({}, defaultConfig, config);
process.chdir(pwd);
return cachedConfig;
}
};