Update README.md

This commit is contained in:
张磊 2015-06-10 08:24:10 +08:00
parent d158c64c78
commit 0f01b01058
1 changed files with 28 additions and 7 deletions

View File

@ -12,18 +12,39 @@ Nuclear used js , html+css and observejs instead of jsx , virtual dom and reques
the file is here: [nuclear.js](https://raw.githubusercontent.com/AlloyTeam/Nuclear/master/dist/nuclear.js) or [nuclear.min.js](https://raw.githubusercontent.com/AlloyTeam/Nuclear/master/dist/nuclear.min.js)
include the file in your html,such as:
```html
<script src="nuclear.min.js"></script>
```
You can also install it via npm:
```html
npm install alloynuclear
```
Nuclear can be used in the CommonJS/AMD module definition environment, but also directly through the script tag reference in your page ,such as:
```html
<script src="nuclear.js"></script>
```
you can get the Nuclear module by synchronizing require in the AMD module definition environment:
```javascript
define(function (require) {
var Nuclear = require('nuclear');
});
```
or asynchronous require
```javascript
require([ 'nuclear' ], function (Nuclear) {
});
```
or require in the CommonJS module definition environment:
```javascript
var Nuclear = require('nuclear');
```
# Many thanks to
* [observe.js](https://github.com/kmdjs/observejs)
* [react.js](http://facebook.github.io/react/)
@ -31,4 +52,4 @@ npm install alloynuclear
* [class.js](http://ejohn.org/blog/simple-javascript-inheritance/)
# License
This content is released under the [MIT](http://opensource.org/licenses/MIT) License.
This content is released under the [MIT](http://opensource.org/licenses/MIT) License.