UI libraries made by Instructure Inc.
npm install media-ui> You'll need to have Git installed on your system.
>
> We use Lerna to manage inter-package dependencies in this monorepo.
>
> Prerequisites: Node.js v18+, Yarn v1.6.0+
> A tested working combination is Node.js v18.20.2 and Yarn v1.22.21.
Installation steps:
1. Install Git.
1. Install Node) and nvm.
1. Install Yarn.
1. Clone this repository: git clone gerrit:media-ui.
1. Run cd media-ui
1. Run yarn
1. Run yarn build
Run yarn run to list the available commands.
1. Run yarn start
1. Open http://localhost:8001 in your browser
1. Run yarn test:watch to run the tests and watch for changes.
1. Run yarn test to run all the tests for every package.
Jenkins builds and publishes a new rc release every time you merge something to master. (This is the reason why we have many rc releases. See them here )
In order to have a properly versioned release, all you need to do is run yarn bump [. This will create a new commit with updated version for each package and will also generate some new lines to CHANGELOG.md. Once this release commit is merged, Jenkins will do a publish to npm with the new version.
The project follows semver versioning having a major, minor and patch version number. (E.g. for 1.2.3 major is 1, minor is 2 and patch is 3)
- yarn bump This command will try to come up with the next version based on the commit messages since the last release.
- yarn bump Sets the given version, for example yarn bump 1.2.3 will change the version to 1.2.3
- yarn bump major Major version should be bumped in case of some breaking changes from the previous interface. Example: 1.2.3 -> 2.0.0
- yarn bump minor Minor version should be bumped if new features are added, but existing interfaces remain the same. Example: 1.2.3 -> 1.3.0
- yarn bump patch Patch version increases are used when an issue is fixed, but no new functionality is added. Example: 1.2.3 -> 1.2.4
Once a new version is released, please communicate it in the #studio Slack channel:
"We have released a new version of media-ui (x.y.z) with the following changes:"
and quote the part of CHANGELOG.md that was generated by the bump.
Linters are run as part of the build. If you use the Sublime Text, Atom, or VSCode editors, you can set up the following plugins to catch lint and formatting errors earlier.
1. Install the _Linter_ plugin Sublime, Atom. Linting is included in VSCode.
1. Install the _EditorConfig_ plugin Sublime, Atom, VSCode
1. Install the _Eslint_ plugin Sublime, Atom, VSCode
1. Install the _Stylelint_ plugin Sublime, Atom, VSCode
1. Run yarn to install the dependencies
1. Restart your editor
1. Run yarn commit to commit your changes and follow our commit message format.
1. Please do not include the output of yarn build in your commits.
1. yarn add or yarn upgrade .
1. Commit the result.
1. Update the relevant package.json file. Make sure to retain the ^ semver range.
1. Run yarn and commit the result.
All components should:
1. be accessible
1. support RTL languages.
1. localize all dates, times, numbers and strings (or require localized content passed in via props).