mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
packager: make output simpler, more legible
Reviewed By: cpojer Differential Revision: D4339417 fbshipit-source-id: f174ee11bc220de5e8da1d8227e9a9ceb5319e8d
This commit is contained in:
committed by
Facebook Github Bot
parent
c92ad5f6ae
commit
ede04abf8f
@@ -11,7 +11,6 @@
|
||||
const querystring = require('querystring');
|
||||
const url = require('url');
|
||||
|
||||
const {createEntry, print} = require('../../../packager/react-packager/src/Logger');
|
||||
const {getInverseDependencies} = require('../../../packager/react-packager/src/node-haste');
|
||||
|
||||
const blacklist = [
|
||||
@@ -114,9 +113,7 @@ function attachHMRServer({httpServer, path, packagerServer}) {
|
||||
path: path,
|
||||
});
|
||||
|
||||
print(createEntry(`HMR Server listening on ${path}`));
|
||||
wss.on('connection', ws => {
|
||||
print(createEntry('HMR Client connected'));
|
||||
const params = querystring.parse(url.parse(ws.upgradeReq.url).query);
|
||||
|
||||
getDependencies(params.platform, params.bundleEntry)
|
||||
@@ -140,7 +137,6 @@ function attachHMRServer({httpServer, path, packagerServer}) {
|
||||
if (!client) {
|
||||
return;
|
||||
}
|
||||
print(createEntry('HMR Server detected file change'));
|
||||
|
||||
const blacklisted = blacklist.find(blacklistedPath =>
|
||||
filename.indexOf(blacklistedPath) !== -1
|
||||
@@ -297,7 +293,6 @@ function attachHMRServer({httpServer, path, packagerServer}) {
|
||||
return;
|
||||
}
|
||||
|
||||
print(createEntry('HMR Server sending update to client'));
|
||||
client.ws.send(update);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user