-
Notifications
You must be signed in to change notification settings - Fork 48
Development Scripts
Andrei Anischevici edited this page Nov 18, 2021
·
4 revisions
Several npm scripts have been provided for assisting in development. Each script can be run by navigating to the cloned repository directory in a terminal and executing npm run scriptname
where scriptname
is the name of the script you would like to run. The most useful scripts are as follows:
-
dev
Spins up a sandbox website where you can manually test the library as though you were a consumer using the library. The sandbox files can be found in thesandbox
directory and can be modified to suit your needs. -
test
Runs unit and functional tests against source files. Tests can be found in thetest
directory. -
test:unit
Runs unit tests against source files. Unit tests can be found in thetest/unit
directory. This will be automatically run when you make a Git commit. -
test:unit:watch
Same astest:unit
, but will re-run the tests as you change source files or test files. -
test:functional
Runs functional tests against source files. Functional tests can be found in thetest/functional
directory. -
test:functional:watch
Same astest:functional
, but will re-run the tests as you change source files or test files (after changing source files you'll need to hit Ctrl+R to re-run tests). Functional tests can be found in thetest/functional
directory. -
test:functional:debug
Starts a Node.js debug server, allowing functional test debugging via IDE/browser debuggers. Supply a test name regex to debug a single test, e.g.npm run test:functional:debug -- -T "Test C28758.*"
-
lint
Analyzes code for potential errors. This will be automatically run when you make a Git commit. -
format
Formats code to match agreed-upon style guidelines. This will be automatically run when you make a Git commit.
When you attempt to commit code changes, several of the above tasks will be run automatically to help ensure that your changes pass tests and are consistent with agreed-upon standards.