sync
This commit is contained in:
parent
0bd6d4b2f6
commit
b8701d0c72
3 changed files with 23 additions and 4 deletions
|
|
@ -2,6 +2,25 @@
|
|||
|
||||
### NPM
|
||||
|
||||
#### Quick start
|
||||
|
||||
```
|
||||
#install
|
||||
npm install mithril@rewrite --save
|
||||
|
||||
# add this line into the scripts section in package.json
|
||||
# "scripts": {
|
||||
# "build": "bundle index.js --output app.js --watch"
|
||||
# }
|
||||
|
||||
# create an `index.js` file
|
||||
|
||||
# run bundler
|
||||
npm run build
|
||||
```
|
||||
|
||||
#### Step by step
|
||||
|
||||
NPM (Node package manager) is the default package manager that is bundled w/ Node.js. It is widely used as the package manager for both client-side and server-side libraries in the Javascript ecosystem. Download and install [Node.js](https://nodejs.org); NPM will be automatically installed as well.
|
||||
|
||||
To use Mithril via NPM:
|
||||
|
|
@ -33,7 +52,7 @@ The easiest way to create a bundle is to setup an NPM script for Mithril's bundl
|
|||
"build": "bundle index.js --output app.js --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"mithril": "^1.0.0-rc.3"
|
||||
"mithril": "^1.0.0-rc.5"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Mithril comes with a testing framework called [ospec](../ospec/README.md). What makes it different from most test frameworks is that it avoids all configurability for the sake of avoiding [yak shaving](http://catb.org/jargon/html/Y/yak-shaving.html) and [analysis paralysis](https://en.wikipedia.org/wiki/Analysis_paralysis).
|
||||
|
||||
The easist way to setup the test runner is to create an NPM script for it. Open your project's `package.json` file and add a `test` entry under the `scripts` section:
|
||||
The easist way to setup the test runner is to create an NPM script for it. Open your project's `package.json` file and edit the `test` line under the `scripts` section:
|
||||
|
||||
```
|
||||
{
|
||||
|
|
@ -12,7 +12,7 @@ The easist way to setup the test runner is to create an NPM script for it. Open
|
|||
"test": "ospec"
|
||||
},
|
||||
"dependencies": {
|
||||
"mithril": "github:mithril@1.0.0-rc.2"
|
||||
"mithril": "^1.0.0-rc.5"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ m.request = requestService.request
|
|||
m.jsonp = requestService.jsonp
|
||||
m.parseQueryString = parseQueryString
|
||||
m.buildQueryString = buildQueryString
|
||||
m.version = "1.0.0-rc.4"
|
||||
m.version = "1.0.0-rc.5"
|
||||
if (typeof module !== "undefined") module["exports"] = m
|
||||
else window.m = m
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue