Helpful scripts

February 15, 2023 ยท View on GitHub

Any of the scripts below can be run by typing npm run <script name> in the project's root directory.

Developing

Script nameDescription
lintReport ESLint style errors and warnings.
lint:fixAutomatically fix linting problems.

Building

Script nameDescription
buildBuild a new set of JS assets, and output them to /dist and /browser.
build:umd:browserBuild /dist/swagger-client.browser.*.js files.
build:commonjsBuild /lib directory containing ES5 code with commonjs imports.
build:esBuild /es directory containing ES5 code with ES6 imports

Testing

Script nameDescription
testRun unit and bundle tests.
test:unitRun unit tests in Node.
test:unit:watchRun tests with change watching.
test:artifactRun tests for browser and node build fragments.
test:artifact:umd:browserRun tests for browser UMD webpack build fragment.
test:artifact:commonjsRun tests for node commonjs fragments.
test:artifact:esRun tests for ES6 imports fragments.

Auditing

Script nameDescription
deps:licenseGenerates attribution files for production and development dependencies