## ui-scripts [![npm][npm]][npm-url] [![MIT License][license-badge]][license] [![Code of Conduct][coc-badge]][coc] A CLI tool for InstUI build and publish tools made by Instructure Inc. ### Scripts For more documentation on available options and parameters for individual commands run: ```sh ui-scripts --help ``` #### build To build (babel transpile) a package to be consumed as a library: `pnpm run ui-scripts build --modules cjs` writes commonjs modules to the lib/ directory. `pnpm run ui-scripts build --modules es` writes es modules to the es/ directory. `pnpm 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: `pnpm run ui-scripts bundle` #### bump version To update all package versions (defaults to determining the version automatically using commit messages): `pnpm run ui-scripts bump [version|major|minor|patch]` #### clean To clean out built/generated files from a package: `pnpm run ui-scripts clean` #### deprecate Deprecates ALL of a certain version of instUI pnpm packages by running `pnpm deprecate`. `versionToDeprecate` defaults to the current version. `pnpm run ui-scripts deprecate --versionToDeprecate 5.11.0 --fixVersion 5.11.1` #### generating design tokens `pnpm run generate-tokens ` Generate cross-platform design tokens for the given theme. `pnpm run generate-all-tokens` Generate cross-platform design tokens for all themes in the repo. #### lint To lint (eslint/stylelint) all files: `pnpm run ui-scripts lint` To lint specific files: `pnpm run ui-scripts lint ./somefile.ts ./someotherfile.css` To fix lint issues: `pnpm run ui-scripts lint --fix` #### publish to pnpm To publish all packages (defaults to current version): `pnpm run ui-scripts publish [version]` #### pnpm tag To add a pnpm dist-tag for all packages: `pnpm run ui-scripts tag add 5.11.0 latest` To remove a pnpm dist-tag for all packages: `pnpm run ui-scripts tag rm 5.11.0 latest` #### running tests To run all tests: `pnpm run ui-scripts test` To run tests for a package: `pnpm run ui-scripts test -- --scope @instructure/ui-avatar` [npm]: https://img.shields.io/npm/v/@instructure/ui-scripts.svg [npm-url]: https://npmjs.com/package/@instructure/ui-scripts [license-badge]: https://img.shields.io/npm/l/instructure-ui.svg?style=flat-square [license]: https://github.com/instructure/instructure-ui/blob/master/LICENSE.md [coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square [coc]: https://github.com/instructure/instructure-ui/blob/master/CODE_OF_CONDUCT.md