The following npm scripts are the main entrypoints for building and testing the Cisco Spark JavaScript SDK.
Build all packages.
npm run build
Detect dependencies for each package and insert into the appropriate package.json
.
npm run deps:generate
Lint all JavaScript files.
npm run lint:js
Options may be specified as switches or via environment variables.
Test all packages
npm test
See all options
npm test -- --help
Test a single package
npm test -- --package @ciscospark/spark-core
Test a single package, but only in a browser
npm test -- --package @ciscospark/spark-core --browser
Test a single package and generate coverage and xunit reports
npm test -- --package @ciscospark/spark-core --coverage --xunit
Keeps the browser open in debug mode so that you can set break points and reload the page with code updates
npm test -- --package @ciscospark/spark-core --browser --karma-debug
Start the sauce tunnel, run tests using Sauce Labs browsers, and stop the Sauce tunnel
npm run sauce:start
npm run sauce:run -- npm test
npm run sauce:stop
Points all of the package.json
s' main entry to their "src" folder. This is useful when testing because it doesn't require you to build a "dist" folder before every run of the test.
npm run distsrc
Used to undo the changes made with distsrc
.
npm run srcdist