mirror of
https://github.com/status-im/metro.git
synced 2025-02-27 18:20:53 +00:00
Second Updates from Mon 23 Mar
- [ReactNative] Use deprecated ix in TabBarExample | Amjad Masad - [ReactNative] Expanded license on obj-c files | Christopher Chedeau - [ReactNative] Expanded license on js files | Christopher Chedeau - [ReactNative] Fix React Devtools integration | Alex Kotliarskyi - [Text] Account for font leading so descenders are not clipped | James Ide - [ReactNative] Expanded license on js packager files | Christopher Chedeau - more UIExplorer flow | Basil Hosmer - [react-packager] Pick up package changes while running | Amjad Masad - Added a graph view and a ReactNative metric that displays current queue and execution time for the JS thread. | Bryce Redd - [ReactNative] Add NativeModules and DeviceEventEmitter to react-native exports | Alex Kotliarskyi
This commit is contained in:
parent
fef4119be0
commit
9a6db3d6e6
@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
@ -8,7 +13,6 @@
|
||||
var sharedBlacklist = [
|
||||
__dirname,
|
||||
'website',
|
||||
'node_modules/parse/node_modules/xmlhttprequest/lib/XMLHttpRequest.js',
|
||||
'node_modules/react-tools/src/utils/ImmutableObject.js',
|
||||
'node_modules/react-tools/src/core/ReactInstanceHandles.js',
|
||||
'node_modules/react-tools/src/event/EventPropagators.js'
|
||||
|
@ -1,4 +1,13 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
|
@ -1,5 +1,11 @@
|
||||
#!/usr/bin/env osascript
|
||||
|
||||
-- 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.
|
||||
|
||||
on run argv
|
||||
set theURL to item 1 of argv
|
||||
|
@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
#!/bin/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.
|
||||
|
||||
# Set terminal title
|
||||
echo -en "\033]0;React Packager\a"
|
||||
clear
|
||||
|
@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
#!/bin/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.
|
||||
|
||||
ulimit -n 4096
|
||||
|
||||
THIS_DIR=$(dirname "$0")
|
||||
|
@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
* 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.
|
||||
*
|
||||
* Wrapper on-top of `optimist` in order to properly support boolean flags
|
||||
* and have a slightly less akward API.
|
||||
|
8
react-packager/__mocks__/debug.js
vendored
8
react-packager/__mocks__/debug.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = function() {
|
||||
|
9
react-packager/__mocks__/net.js
vendored
9
react-packager/__mocks__/net.js
vendored
@ -1,3 +1,12 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var servers = {};
|
||||
exports.createServer = function(listener) {
|
||||
|
9
react-packager/example_project/bar.js
vendored
9
react-packager/example_project/bar.js
vendored
@ -1,5 +1,12 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule bar
|
||||
*/
|
||||
|
||||
module.exports = setInterval;
|
||||
module.exports = setInterval;
|
||||
|
7
react-packager/example_project/foo/foo.js
vendored
7
react-packager/example_project/foo/foo.js
vendored
@ -1,4 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule foo
|
||||
*/
|
||||
|
||||
|
8
react-packager/example_project/index.js
vendored
8
react-packager/example_project/index.js
vendored
@ -1,6 +1,12 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule index
|
||||
* @jsx React.DOM
|
||||
*/
|
||||
|
||||
require('main');
|
||||
|
7
react-packager/example_project/js/Channel.js
vendored
7
react-packager/example_project/js/Channel.js
vendored
@ -1,4 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule Channel
|
||||
*/
|
||||
|
||||
|
7
react-packager/example_project/js/XHR.js
vendored
7
react-packager/example_project/js/XHR.js
vendored
@ -1,4 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule XHR
|
||||
*/
|
||||
|
||||
|
7
react-packager/example_project/js/code.js
vendored
7
react-packager/example_project/js/code.js
vendored
@ -1,4 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule code
|
||||
*/
|
||||
var XHR = require('XHR');
|
||||
|
7
react-packager/example_project/js/main.js
vendored
7
react-packager/example_project/js/main.js
vendored
@ -1,4 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @providesModule main
|
||||
*/
|
||||
var Channel = require('Channel');
|
||||
|
@ -1,3 +1,13 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
@ -1,4 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="css/index.css">
|
||||
|
8
react-packager/index.js
vendored
8
react-packager/index.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var Activity = require('./src/Activity');
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
|
8
react-packager/src/Activity/index.js
vendored
8
react-packager/src/Activity/index.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var COLLECTION_PERIOD = 1000;
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
function ModuleDescriptor(fields) {
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var fs = jest.genMockFromModule('fs');
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
|
@ -1,17 +1,10 @@
|
||||
/**
|
||||
* Copyright 2013 Facebook, Inc.
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var ModuleDescriptor = require('../../ModuleDescriptor');
|
||||
@ -296,35 +304,50 @@ DependecyGraph.prototype._findAndProcessPackage = function(files, root) {
|
||||
}
|
||||
|
||||
if (packagePath != null) {
|
||||
return readFile(packagePath, 'utf8')
|
||||
.then(function(content) {
|
||||
var packageJson;
|
||||
try {
|
||||
packageJson = JSON.parse(content);
|
||||
} catch (e) {
|
||||
debug('WARNING: malformed package.json: ', packagePath);
|
||||
return q();
|
||||
}
|
||||
|
||||
if (packageJson.name == null) {
|
||||
debug(
|
||||
'WARNING: package.json `%s` is missing a name field',
|
||||
packagePath
|
||||
);
|
||||
return q();
|
||||
}
|
||||
|
||||
packageJson._root = root;
|
||||
self._packageByRoot[root] = packageJson;
|
||||
self._packagesById[packageJson.name] = packageJson;
|
||||
|
||||
return packageJson;
|
||||
});
|
||||
return this._processPackage(packagePath);
|
||||
} else {
|
||||
return q();
|
||||
}
|
||||
};
|
||||
|
||||
DependecyGraph.prototype._processPackage = function(packagePath) {
|
||||
var packageRoot = path.dirname(packagePath);
|
||||
var self = this;
|
||||
return readFile(packagePath, 'utf8')
|
||||
.then(function(content) {
|
||||
var packageJson;
|
||||
try {
|
||||
packageJson = JSON.parse(content);
|
||||
} catch (e) {
|
||||
debug('WARNING: malformed package.json: ', packagePath);
|
||||
return q();
|
||||
}
|
||||
|
||||
if (packageJson.name == null) {
|
||||
debug(
|
||||
'WARNING: package.json `%s` is missing a name field',
|
||||
packagePath
|
||||
);
|
||||
return q();
|
||||
}
|
||||
|
||||
packageJson._root = packageRoot;
|
||||
self._addPackageToIndices(packageJson);
|
||||
|
||||
return packageJson;
|
||||
});
|
||||
};
|
||||
|
||||
DependecyGraph.prototype._addPackageToIndices = function(packageJson) {
|
||||
this._packageByRoot[packageJson._root] = packageJson;
|
||||
this._packagesById[packageJson.name] = packageJson;
|
||||
};
|
||||
|
||||
DependecyGraph.prototype._removePackageFromIndices = function(packageJson) {
|
||||
delete this._packageByRoot[packageJson._root];
|
||||
delete this._packagesById[packageJson.name];
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse a module and update indices.
|
||||
*/
|
||||
@ -436,16 +459,27 @@ DependecyGraph.prototype._processFileChange = function(eventType, filePath, root
|
||||
|
||||
this._debugUpdateEvents.push({event: eventType, path: filePath});
|
||||
|
||||
var isPackage = path.basename(filePath) === 'package.json';
|
||||
if (eventType === 'delete') {
|
||||
var module = this._graph[absPath];
|
||||
if (module == null) {
|
||||
return;
|
||||
}
|
||||
if (isPackage) {
|
||||
var packageJson = this._packageByRoot[path.dirname(absPath)];
|
||||
if (packageJson) {
|
||||
this._removePackageFromIndices(packageJson);
|
||||
}
|
||||
} else {
|
||||
var module = this._graph[absPath];
|
||||
if (module == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._deleteModule(module);
|
||||
this._deleteModule(module);
|
||||
}
|
||||
} else if (!(stat && stat.isDirectory())) {
|
||||
var self = this;
|
||||
this._loading = this._loading.then(function() {
|
||||
if (isPackage) {
|
||||
return self._processPackage(absPath);
|
||||
}
|
||||
return self._processModule(absPath);
|
||||
});
|
||||
}
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../')
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
|
@ -1,17 +1,10 @@
|
||||
/**
|
||||
* Copyright 2013 Facebook, Inc.
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* 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 pipes all of our console logging functions to native logging so that
|
||||
* JavaScript errors in required modules show up in Xcode via NSLog.
|
||||
|
@ -1,5 +1,11 @@
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* The particular require runtime that we are using looks for a global
|
||||
* `ErrorUtils` object and if it exists, then it requires modules with the
|
||||
* error handler specified via ErrorUtils.setGlobalHandler by calling the
|
||||
|
@ -1,17 +1,10 @@
|
||||
/**
|
||||
* Copyright 2013 Facebook, Inc.
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* 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 pipes all of our console logging functions to native logging so that
|
||||
* JavaScript errors in required modules show up in Xcode via NSLog.
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var HasteDependencyResolver = require('./haste');
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var Promise = require('q').Promise;
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
|
10
react-packager/src/FileWatcher/index.js
vendored
10
react-packager/src/FileWatcher/index.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
@ -56,7 +64,7 @@ function createWatcher(root) {
|
||||
}
|
||||
|
||||
return detectingWatcherClass.then(function(Watcher) {
|
||||
var watcher = new Watcher(root, {glob: '**/*.js'});
|
||||
var watcher = new Watcher(root, {glob: ['**/*.js', '**/package.json']});
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
var rejectTimeout = setTimeout(function() {
|
||||
|
8
react-packager/src/JSTransformer/Cache.js
vendored
8
react-packager/src/JSTransformer/Cache.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var _ = require('underscore');
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
// Bug with Jest because we're going to the node_modules that is a sibling
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
// Bug with Jest because we're going to the node_modules that is a sibling
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = function (data, callback) {
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
|
9
react-packager/src/JSTransformer/index.js
vendored
9
react-packager/src/JSTransformer/index.js
vendored
@ -1,4 +1,11 @@
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
|
8
react-packager/src/JSTransformer/worker.js
vendored
8
react-packager/src/JSTransformer/worker.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var transformer = require('./transformer');
|
||||
|
8
react-packager/src/Packager/Package.js
vendored
8
react-packager/src/Packager/Package.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var _ = require('underscore');
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
|
8
react-packager/src/Packager/index.js
vendored
8
react-packager/src/Packager/index.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var assert = require('assert');
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.setMock('worker-farm', function() { return function() {}; })
|
||||
|
10
react-packager/src/Server/index.js
vendored
10
react-packager/src/Server/index.js
vendored
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var url = require('url');
|
||||
@ -67,7 +75,7 @@ function Server(options) {
|
||||
this._debouncedFileChangeHandler = _.debounce(function(filePath) {
|
||||
self._rebuildPackages(filePath);
|
||||
self._informChangeWatchers();
|
||||
}, 50, true);
|
||||
}, 50);
|
||||
}
|
||||
|
||||
Server.prototype._onFileChange = function(type, filepath, root) {
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = function(declared) {
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
|
7
react-packager/src/lib/declareOpts.js
vendored
7
react-packager/src/lib/declareOpts.js
vendored
@ -1,4 +1,11 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* Declares, validates and defaults options.
|
||||
* var validate = declareOpts({
|
||||
* foo: {
|
||||
|
@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
* 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.
|
||||
*
|
||||
* Note: This is a fork of the fb-specific transform.js
|
||||
*/
|
||||
|
@ -1,7 +1,11 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var WebSocketServer = require('ws').Server;
|
||||
|
Loading…
x
Reference in New Issue
Block a user