Skip to content

Latest commit

 

History

History
93 lines (60 loc) · 1.56 KB

SCRIPTS.md

File metadata and controls

93 lines (60 loc) · 1.56 KB

Scripts

The following npm scripts are the main entrypoints for building and testing the Cisco Spark JavaScript SDK.

build

Build all packages.

npm run build

deps:generate

Detect dependencies for each package and insert into the appropriate package.json.

npm run deps:generate

lint:js

Lint all JavaScript files.

npm run lint:js

test

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

sauce:start, sauce:run, sauce:stop

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

distsrc

Points all of the package.jsons' 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

srcdist

Used to undo the changes made with distsrc.

npm run srcdist