Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/node_modules/
/build/
/.nyc_output/
/coverage/
12 changes: 6 additions & 6 deletions api/aois.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ function get(id, options) {
* @param {function(function())} options.terminator A function that is called
* with a function that can be called back to terminate the request.
* @return {Promise.<Object[]>} A promise that resolves to an array of AOI
* metadata or is rejected with any error. See the [`errors` module]
* (#module:planet-client/api/errors) for a list of the possible error
* types.
* metadata or is rejected with any error. See the [`errors`
* module](#module:planet-client/api/errors) for a list of the possible
* error types.
* @see {@link get} to obtain an individual AOI's GeoJSON and metadata.
*/
function list(id, options) {
Expand All @@ -70,9 +70,9 @@ function list(id, options) {
* @param {function(function())} options.terminator A function that is called
* with a function that can be called back to terminate the request.
* @return {Promise.<Object[]>} A promise that resolves to an array of AOI
* metadata or is rejected with any error. See the [`errors` module]
* (#module:planet-client/api/errors) for a list of the possible error
* types.
* metadata or is rejected with any error. See the [`errors`
* module](#module:planet-client/api/errors) for a list of the possible
* error types.
*/
function create(name, file, options) {
options = options || {};
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"scripts": {
"pretest": "eslint bin examples api cli test",
"test-node": "nyc mocha --recursive test",
"test-browser": "karma start test/karma.config.js --single-run",
"test": "npm run test-node && npm run test-browser",
"coverage": "nyc report --reporter=html",
"test-debug": "mocha --debug-brk --recursive test",
"start": "watchy --watch bin,examples,api,cli,test -- npm test",
"test-browser-once": "karma start test/karma.config.js --single-run",
"test-browser-forever": "karma start test/karma.config.js",
"test": "npm run test-node && npm run test-browser-once",
"start": "npm run test-browser-forever & watchy --watch bin,examples,api,cli,test -- bash -c '(npm run pretest && npm run test-node)'",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"postpublish": "npm run publish-doc",
"apidoc": "mkdir -p build && jsdoc --template jsdoc-json --destination build/api.json api",
"doc": "npm run apidoc && node --harmony-generators tasks/build-docs.js",
Expand Down
20 changes: 17 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,33 @@ To get set up, clone the repository and install the development dependencies:
cd planet-client-js
npm install

Run the tests to ensure any changes meet the coding style and maintain the expected functionality:
#### Running the tests

The tests are run in a browser and in Node. You can run the linter and all tests once with the following:

npm test

During development, you can start a file watcher that runs the linter and tests with any file changes:
To start a file watcher that runs the linter and tests with any file changes:

npm start

With the `npm start` task running, you can attach any number of browsers to the [test server](http://localhost:9876/). Every time you attach a new browser, tests run in all browsers. To debug any failing test, visit the test runner [debug page](http://localhost:9876/debug.html) and open your development console.

#### Building the docs

The project docs are generated from templates in the `doc` directory. The API docs are generated based on annotations in comments throughout the `api` modules. You can build the docs with the following task:

npm run doc

If you are making frequent changes and want to rebuild the docs with each change, use the `npm run start-doc` task. You can view the doc output in the `build/doc` directory.

#### Publishing a release

Releases are published from the master branch. To cut a new minor release, do this:

npm version minor && git push --tags origin master && npm publish

The `postpublish` script will update [the docs](http://planetlabs.github.io/planet-client-js/).
The `postpublish` script will update the hosted version of [the docs](http://planetlabs.github.io/planet-client-js/).

[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
Expand Down