0.2.0 • Published 9 years ago

global-react v0.2.0

Weekly downloads
4
License
MIT
Repository
-
Last release
9 years ago

global-react

When you want something like

<script src="path/to/react-component-1.js"></script>
<script src="path/to/react-component-2.js"></script>
<script src="path/to/react-app.js"></script>

that you can use component-1 and component-2 in app, but react-component-1.js and react-component-2.js are browserified along with React already, you will run into errors.

How to solve it

npm install --save-dev global-react
browserify entry1.js -g global-react -o react-component-1.js
browserify entry2.js -g global-react -o react-component-2.js
browserify app.js    -g global-react -o react-app.js

Change the HTML page to

<script src="path/to/global.react.js"></script>
<script src="path/to/react-component-1.js"></script>
<script src="path/to/react-component-2.js"></script>
<script src="path/to/react-app.js"></script>
0.2.0

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago