Monorepo containing the Cisco Spark JavaScript SDKs (both current and legacy).
ciscospark is a collection of node modules targeting our external APIs. Its core libraries take inspiration from our web client's Legacy SDK.
This README primarily discusses the tooling required to develop the Cisco Spark SDK.
Install tooling dependencies with
npm install
Install module dependencies with
npm run bootstrap
(This installs dependencies to packages/*/node_modules)
The following commands should be run from the SDK root directory. Tooling dependencies are typically defined only in the root node_modules directory to avoid duplicates. (eslint is installed in each package directory because many editors, or at least Atom, get confused by the monorepo layout and which eslint binary to use).
PACKAGE=PACKAGENAME npm run grunt:package -- build
PACKAGE=PACKAGENAME npm run grunt:package -- test
Handy during early plugin development when you can write a bunch of unit tests.
UNIT_ONLY=true PACKAGE=PACKAGENAME npm run grunt:package -- test
Usually faster, and can build on the fly, thus no need to rebuild everything between test runs
PACKAGE=PACKAGENAME npm run grunt:package -- express:test test:node
Keeps the browser open so that you can reload set break points and reload the page
KARMA_DEBUG=true PACKAGE=PACKAGENAME npm run grunt:package -- express:test test:browser
This is mostly useful for the the example app(s), but also comes in handy when debugging the credentials plugins automation tests.
PACKAGE=PACKAGENAME npm run grunt:package -- serve
OK, this one's a handful and requires a global package, but there were too many possible variants to hardcode it any where.
npm install -g nodemon
nodemon -w packages/PACKAGENAME/src -w packages/PACKAGENAME/test -x "UNIT_ONLY=true PACKAGE=PACKAGENAME npm run --silent grunt:package express:test test:node"
To compile the documentation locally, make sure you have Bundler or Jekyll installed then run the following:
Set Up Environment (with Bundler)
cd docs
bundle install
Compile and Serve Docs
cd docs
bundle exec jekyll serve --config=_config.yml,_config.local.yml
Pull requests welcome. Please see CONTRIBUTING.md for more details.
© 2016-2017 Cisco and/or its affiliates. All Rights Reserved.