1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 10:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
tdzl2003
2016-08-14 00:58:34 +08:00
parent b08b1b1126
commit 28d9653f6c
4 changed files with 37 additions and 17 deletions

View File

@@ -6,6 +6,8 @@
因为React Native调整了okhttp的依赖对于0.27以上版本的React Native请安装1.1.x版本对于0.26及以前版本请安装1.0.x版本。
0.31开始React Native调整了bundle的传参,因此需要更新本插件到2.1.0
### 优势
1. 命令行工具&网页双端管理版本发布过程简单便捷完全可以集成CI。

View File

@@ -365,8 +365,25 @@ export const commands = {
const Config = require(path.resolve('node_modules/react-native/local-cli/util/Config'));
const bundle = require(path.resolve('node_modules/react-native/local-cli/bundle/bundle'));
const defaultConfig = require(path.resolve('node_modules/react-native/local-cli/default.config'));
const defaultConfig =
Config.get(path.resolve('node_modules/react-native/local-cli'),
require(path.resolve('node_modules/react-native/local-cli/default.config'))
);
if (bundle.func) {
// React native after 0.31.0
await bundle.func([], defaultConfig, {
entryFile : entryFile,
platform: platform,
dev: !!dev,
bundleOutput: `${realIntermedia}${path.sep}index.bundlejs`,
assetsDest: `${realIntermedia}`,
verbose: !!verbose,
transformer: require.resolve('react-native/packager/transformer'),
bundleEncoding: 'utf8',
});
} else {
// React native before 0.30.0
await bundle([
'--entry-file',
entryFile,
@@ -380,7 +397,8 @@ export const commands = {
`${realIntermedia}`,
'--verbose',
'' + !!verbose,
], Config.get(path.resolve('node_modules/react-native/local-cli'), defaultConfig));
], defaultConfig);
}
console.log('Packing');

View File

@@ -33,7 +33,7 @@ exports.run = function () {
console.log('Not loggined.\nRun `pushy login` at your project directory to login.');
return;
}
console.error(err.message);
console.error(err.stack);
process.exit(-1);
});
};

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "2.0.1",
"version": "2.1.0",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {