-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added build instructions * Add details to README - Add link to docs - Add link to examples - Add a few useful `npm` commands - Add a header to `api.md` - Re-generated docs in source file order instead of alphabetical order
- Loading branch information
Showing
4 changed files
with
231 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,63 @@ | ||
# particle-api-js | ||
JS Library for the Particle API | ||
JS Library for the Particle Cloud API for Node.js and the browser | ||
|
||
## Install | ||
[![Build Status](https://travis-ci.org/spark/particle-api-js.svg?branch=master)](https://travis-ci.org/spark/particle-api-js) | ||
|
||
`npm install particle-api-js` | ||
## Installation | ||
|
||
`particle-api-js` is available from `npm` to use in Node.js, `bower` or jsDelivr CDN for use in the browser. | ||
|
||
#### Npm | ||
``` | ||
$ npm install particle-api-js` | ||
``` | ||
|
||
#### Bower | ||
``` | ||
$ bower install particle-api-js | ||
``` | ||
|
||
#### jsDelivr CDN | ||
```html | ||
<script type="text/javascript" src="//cdn.jsdelivr.net/particle-api-js/5/particle.min.js"> | ||
</script> | ||
``` | ||
|
||
## Documentation | ||
|
||
[API Docs](docs/api.md) | ||
First, read the [documentation for Particle API JS on the Documentation website.][docs-website] It contains examples to get started. | ||
|
||
For more details, read the [API reference on GitHub.](docs/api.md) | ||
|
||
## Examples | ||
|
||
There [are many snippets of using Particle API JS on the Documentation website][docs-website] and some complete examples in the [GitHub examples directory.](/examples) | ||
|
||
## Building | ||
|
||
Make your changes to the files in the `src` directory, then from the project directory run: | ||
|
||
``` | ||
$ npm run compile && npm run build | ||
``` | ||
|
||
The `dist` directory will contain the compiled and minified files that can be included in your project. | ||
|
||
Run tests to make sure your changes are good: | ||
|
||
``` | ||
$ npm test | ||
``` | ||
|
||
Update the API docs with your changes: | ||
|
||
``` | ||
$ npm run docs | ||
``` | ||
|
||
|
||
## License | ||
|
||
Copyright © 2016 Particle Industries, Inc. Released under the Apache 2.0 license. See [LICENSE](/LICENSE) for details. | ||
|
||
[docs-website]: https://docs.particle.io/reference/javascript/ |
Oops, something went wrong.