Update README with steps to run in the browser.

This commit is contained in:
David Anson 2015-06-17 18:35:11 -07:00
parent 51f420cfe1
commit 4a5ea23ff7

View file

@ -38,9 +38,6 @@ cases come directly from that project.
[`markdownlint` demo](http://dlaa.me/markdownlint/), an interactive, in-browser
playground for learning and exploring.
> *Note*: `markdownlint` is not intended for use in the browser; the demo has
> polyfills and avoids referencing the `fs` module.
## Rules
* **MD001** - Header levels should only increment by one level at a time
@ -364,6 +361,34 @@ bad.md: 3: MD018 No space after hash on atx style header
Use --force to continue.
```
## Browser
`markdownlint` works in the browser.
Generate normal and minified scripts with:
```shell
npm run build-demo
```
Then reference `markdown-it` and `markdownlint`:
```html
<script src="demo/markdown-it.min.js"></script>
<script src="demo/markdownlint-browser.min.js"></script>
```
And call it like so:
```js
var options = {
"strings": {
"content": "Some Markdown to lint."
}
};
var results = window.markdownlint.sync(options).toString();
```
## History
* 0.0.1 - Initial release, includes tests MD001-MD032.