oui
oui copied to clipboard
Audit scripts
OUI has a lot of scripts that have been carried over from the fork. Not all of these may be up to date, follow our workflow, align with our goals, etc. We need to audit this scripts and remove or change any that don't make sense anymore.
- [ ]
start - [ ]
test-docker - [ ]
sync-docs - [ ]
build-docs - [ ]
build - [ ]
clean - [ ]
compile-icons - [ ]
extract-i18n-strings - [ ]
lint - [ ]
lint-fix - [ ]
lint-es - [ ]
lint-es-fix - [ ]
lint-sass - [ ]
lint-sass-fix - [ ]
test - [ ]
test-unit - [ ]
test-a11y - [ ]
test-staged - [ ]
start-test-server - [ ]
yo-component - [ ]
update-token-changelog - [ ]
start-test-server-and-a11y-test - [ ]
yo-doc - [ ]
release - [ ]
postinstall - [ ]
version
Scripts defined in package.json
| name | description | useful? | keep? | comments |
|---|---|---|---|---|
start |
Start dev server | ✔️ | ✔️ | |
test-docker |
Seems to be a script that runs a few test commands in a Docker container | ❔ | ❌ | We don't use it in any way, and it doesn't seem to provide us any extra value. Additionally, if we were to support it, we'd most likely need to maintain an extra Docker image |
sync-docs |
Updates the docs folder and pushes changes to upstream remote |
❌ | ❌ | Our docsite isn't based on the docs folder in the repo, there is no use for this script |
build-docs |
Build the docsite | ✔️ | ✔️ | |
build |
Build OUI for consumption | ✔️ | ✔️ | |
clean |
Clean out some of the build artifacts | ✔️ | ✔️ | |
compile-icons |
Compiles icon SVGs into React components | ✔️ | ✔️ | |
extract-i18n-strings |
Extracts strings used for i18n into a JSON file for internationalization | ✔️ | ✔️ | |
lint |
Breakout for running Typescript type checker, lint-es, and lint-sass |
✔️ | ✔️ | |
lint-fix |
Runs lint-es-fix |
✔️ | ✔️ | Should also include lint-sass-fix |
lint-es |
Runs eslint |
✔️ | ✔️ | |
lint-es-fix |
Runs eslint autofixer |
✔️ | ✔️ | |
lint-sass/lint-style |
Runs stylelint/sass-lint |
✔️ | ✔️ | Will change names when #949 is merged |
lint-sass-fix/lint-style-fix |
Runs stylelint/sass-lint autofixer |
✔️ | ✔️ | Will change names when #949 is merged |
test |
Breakout for lint and test-unit |
✔️ | ✔️ | |
test-unit |
Runs Jest unit tests | ✔️ | ✔️ | |
test-a11y |
Runs Axe a11y tests on a running server | ✔️ | ✔️ | |
test-staged |
Runs unit tests on files that are staged in git | ✔️ | ✔️ | This is ran on pre-commit git hook |
start-test-server |
Starts a dev server on port 9999 for automated testing |
✔️ | ✔️ | This is mainly used by start-test-server-and-a11y-test. Could be inlined maybe? |
yo-component |
Runs yeoman component generator |
❔ | ❔ | I have personally never used this, and feel like it may be limited use. I think it may be something that involves more maintenance for not very much benefit. Open to discussion |
start-test-server-and-a11y-test |
Starts the test server and runs a11y tests on that test server. Much more streamlined than manually starting the test server and running the a11y tests manually | ✔️ | ✔️ | |
yo-doc |
Runs yeoman documentation page generator |
❔ | ❔ | Same as yo-component |
release |
Unknown - the file in the scripts folder doesn't exist |
❌ | ❌ | |
postinstall |
Runs after an install command is run - necessary for usage as a package | ✔️ | ✔️ | |
preinstall |
Similar to postinstall - necessary for usage as a package |
✔️ | ✔️ | |
version |
Adds a new section to the changelog for the current version | ❔ | ❌ | This is extremely easy to do manually and less prone to error in changelog formatting |
These could also go for a re-ordering to make more sense as well as a name format shift towards what OSD does, i.e. lint:style, test:unit, etc.
Still need to go through the files in scripts folder