Skip to content

Commit bcf762a

Browse files
martinbigiofacebook-github-bot-3
authored andcommitted
Move files from packager/ to local-cli
Summary: public This is not only to put the files on a place where it makes more sense but also to allow to use ES6 features on them as `/packager` is not whitelisted on `babel`. Reviewed By: mkonicek Differential Revision: D2577267 fb-gh-sync-id: b69a17c0aad349a3eda987e33d1778d97a8e1549
1 parent f87d2e1 commit bcf762a

19 files changed

Lines changed: 30 additions & 24 deletions

local-cli/bundle/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
const buildBundle = require('./buildBundle');
1212
const bundleCommandLineArgs = require('./bundleCommandLineArgs');
13-
const parseCommandLine = require('../../packager/parseCommandLine');
13+
const parseCommandLine = require('../util/parseCommandLine');
1414

1515
/**
1616
* Builds the bundle starting to look for dependencies at the given entry path.

local-cli/dependencies/dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
const fs = require('fs');
1212
const log = require('../util/log').out('dependencies');
13-
const parseCommandLine = require('../../packager/parseCommandLine');
13+
const parseCommandLine = require('../util/parseCommandLine');
1414
const path = require('path');
1515
const Promise = require('promise');
1616
const ReactPackager = require('../../packager/react-packager');

local-cli/generate/generate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
'use strict';
1010

11-
const parseCommandLine = require('../../packager/parseCommandLine');
11+
const parseCommandLine = require('../util/parseCommandLine');
1212
const path = require('path');
1313
const Promise = require('promise');
1414
const yeoman = require('yeoman-environment');

local-cli/library/library.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
const copyAndReplace = require('../util/copyAndReplace');
1212
const fs = require('fs');
1313
const isValidPackageName = require('../util/isValidPackageName');
14-
const parseCommandLine = require('../../packager/parseCommandLine');
14+
const parseCommandLine = require('../util/parseCommandLine');
1515
const path = require('path');
1616
const Promise = require('promise');
1717
const walk = require('../util/walk');

local-cli/runAndroid/runAndroid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const chalk = require('chalk');
1212
const child_process = require('child_process');
1313
const fs = require('fs');
1414
const path = require('path');
15-
const parseCommandLine = require('../../packager/parseCommandLine');
15+
const parseCommandLine = require('../util/parseCommandLine');
1616
const isPackagerRunning = require('../util/isPackagerRunning');
1717
const Promise = require('promise');
1818

File renamed without changes.

packager/getDevToolsMiddleware.js renamed to local-cli/server/middleware/getDevToolsMiddleware.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ function getChromeAppName() {
2727
module.exports = function(options, isDebuggerConnected) {
2828
return function(req, res, next) {
2929
if (req.url === '/debugger-ui') {
30-
var debuggerPath = path.join(__dirname, 'debugger.html');
30+
var debuggerPath = path.join(__dirname, '..', 'util', 'debugger.html');
3131
res.writeHead(200, {'Content-Type': 'text/html'});
3232
fs.createReadStream(debuggerPath).pipe(res);
3333
} else if (req.url === '/debuggerWorker.js') {
34-
var workerPath = path.join(__dirname, 'debuggerWorker.js');
34+
var workerPath = path.join(__dirname, '..', 'util', 'debuggerWorker.js');
3535
res.writeHead(200, {'Content-Type': 'application/javascript'});
3636
fs.createReadStream(workerPath).pipe(res);
3737
} else if (req.url === '/launch-safari-devtools') {

packager/getFlowTypeCheckMiddleware.js renamed to local-cli/server/middleware/getFlowTypeCheckMiddleware.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
var chalk = require('chalk');
1212
var exec = require('child_process').exec;
1313
var url = require('url');
14-
var Activity = require('./react-packager').Activity;
14+
var Activity = require('../../../packager/react-packager').Activity;
1515

1616
var hasWarned = {};
1717

File renamed without changes.

packager/openStackFrameInEditorMiddleware.js renamed to local-cli/server/middleware/openStackFrameInEditorMiddleware.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
'use strict';
1010

11-
const launchEditor = require('./launchEditor');
11+
const launchEditor = require('../util/launchEditor');
1212

1313
module.exports = function(req, res, next) {
1414
if (req.url === '/open-stack-frame') {

0 commit comments

Comments
 (0)