A CLI tool for InstUI build and publish tools made by Instructure Inc.
For more documentation on available options and parameters for individual commands run:
ui-scripts <command> --help
To build (babel transpile) a package to be consumed as a library:
npm run ui-scripts build --modules cjs
writes commonjs modules to the lib/ directory.
npm run ui-scripts build --modules es
writes es modules to the es/ directory.
npm run ui-scripts build --modules es,cjs
writes es modules to both directories.
If not specified, modules
defaults to es
.
To build (webpack) a package to be consumed as an application:
npm run ui-scripts bundle
To update all package versions (defaults to determining the version automatically using commit messages):
npm run ui-scripts bump [version|major|minor|patch]
To clean out built/generated files from a package:
npm run ui-scripts clean
Deprecates ALL of a certain version of instUI npm packages by running npm deprecate
.
versionToDeprecate
defaults to the current version.
npm run ui-scripts deprecate --versionToDeprecate 5.11.0 --fixVersion 5.11.1
To build component examples and start up a dev server with hot reloading:
npm run ui-scripts examples --watch -p 8080
To build component examples for deploying:
npm run ui-scripts examples
npm run generate-tokens <options>
Generate cross-platform design tokens for the given theme.
npm run generate-all-tokens
Generate cross-platform design tokens for all themes in the repo.
To lint (eslint/stylelint) all files:
npm run ui-scripts lint
To lint specific files:
npm run ui-scripts lint ./somefile.ts ./someotherfile.css
To fix lint issues:
npm run ui-scripts lint --fix
To publish all packages (defaults to current version):
npm run ui-scripts publish [version]
To start up a server to test production builds of examples or docs:
npm run ui-scripts server -p 8080
To add an NPM dist-tag for all packages:
npm run ui-scripts tag add 5.11.0 latest
To remove an NPM dist-tag for all packages:
npm run ui-scripts tag rm 5.11.0 latest
To run all tests:
npm run ui-scripts test
To run tests for a package:
npm run ui-scripts test -- --scope @instructure/ui-avatar
If you'd like to use the publish, deploy, and release scripts, you'll need to configure your project as follows:
Add a .env
file to your project root or define these env vars for your shell:
NPM_TOKEN=
NPM_USERNAME=
NPM_EMAIL=