Coder Social home page Coder Social logo

rn-packager's Introduction

ReactNative Packager


Standalone ReactNative Packager without framework code.

node.js react-native react

Do What?

  1. bundle-split, solution from facebook/react-native#10804
  2. use module name as before (ps: core.bundle and app.bundle are different bundle session, so module ids may conflict)

Dependencies

"devDependencies": {
  "rn-packager": "~0.12.0",
  "react-native": "0.42.3",
  "react": "~15.4.1"
}

Bundle

Now u can use manifest.json file to generate core modules.

  1. Bundle ur core bundle and output manifest.json
  2. Bundle ur app bundle with manifest.json that Step 1 generated.

Bundle core

$ rnpackager bundle --entry-file node_modules/react-native/Libraries/react-native/react-native.js --bundle-output core.ios.bundle --platform ios --manifest-output core.ios.manifest.json

Bundle app

rnpackager bundle --entry-file foo.js --bundle-output foo.ios.bundle --platform ios --manifest-file core.ios.manifest.json

Server

$ rnpackager start

Demo

$ cd tests
$ npm i
$ rnpackager start

visit:

rn-packager's People

Contributors

swainet avatar yiminghe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rn-packager's Issues

support tsx

http://localhost:8081/examples/react-native/popup.bundle?platform=ios

will set entryFile to popup.tsx

add package name to dep module

package.json

{
  "name":"app"
}
_d(()=>{
require('lodash/yy')
},'lodash/xx')

to

_d(()=>{
require('app/node_modules/lodash/yy')
},'app/node_modules/lodash/xx')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.