react-native 打包

终端cd到工程目录下

react-native bundle --entry-file index.ios.js --platform ios --dev false --bundle-output ./ios/main.jsbundle --assets-dest ./ios/

终端打印如下:

[2017-03-03 15:59:22]  Initializing Packager
[2017-03-03 15:59:22]  Building in-memory fs for JavaScript
[2017-03-03 15:59:23]    Building in-memory fs for JavaScript (240ms)
[2017-03-03 15:59:23]  Building Haste Map
[2017-03-03 15:59:30]    Building Haste Map (7079ms)
[2017-03-03 15:59:30]    Initializing Packager (7628ms)
[2017-03-03 15:59:30]  Transforming files
[2017-03-03 15:59:35]    Transforming files (5360ms)
bundle: start
bundle: finish
bundle: Writing bundle output to: ./ios/main.jsbundle
bundle: Copying 289 asset files
bundle: Done writing bundle output
bundle: Done copying assets

addFileTo, 勾选如下:

react-native 打包_第1张图片
屏幕快照 2017-03-03 下午4.04.02.png

添加到项目中的文件夹必须是蓝色

参考原文地址:http://www.jianshu.com/p/ce71b4a8a246

你可能感兴趣的:(react-native 打包)