The following documentation is only for the maintainers of this repository.
This project uses PNPM, therefore, you must install PNPM first:
npm install -g pnpm
To install this project, open a terminal at the root of the project and execute the following command:
pnpm install
Retype is the documentation platform that Squide is using for its documentation. As this project is leveraging a few Pro features of Retype.
Everything should work fine as-is but there are a few limitations to use Retype Pro features without a wallet with a licence. If you want to circumvent these limitations, you can optionally, setup your Retype wallet.
To do so, first make sure that you retrieve the Retype license from your Vault (or ask IT).
Then, open a terminal at the root of the project and execute the following command:
npx retype wallet --add <your-license-key-here>
When you are ready to release the packages, you must follow the following steps:
- Run
pnpm changeset
and follow the prompt. For versioning, always follow the SemVer standard. - Commit the newly generated file in your branch and submit a new Pull Request (PR). Changesets will automatically detect the changes and post a message in your pull request telling you that once the PR closes, the versions will be released.
- Find someone to review your PR.
- Merge the Pull request into
main
. A GitHub action will automatically trigger and update the version of the packages and publish them to npm. A tag will also be created on GitHub tagging your PR merge commit.
Make sure you're Git is clean (No pending changes).
Make sure GitHub Action has write access to the selected npm packages.
If the packages failed to compile, it's easier to debug without executing the full release flow every time. To do so, instead, execute the following command:
pnpm build
By default, packages compilation output will be in their respective dist directory.
If you got linting error, most of the time, they can be fixed automatically using eslint . --fix
, if not, follow the report provided by pnpm lint
.
From the project root, you have access to many commands. The most important ones are:
Build the library.
pnpm build
Lint the files (ESLint, StyleLint and TS types).
pnpm lint
To use when you want to publish a new package version. Will display a prompt to fill in the information about your new release.
pnpm changeset
Clean the shell packages and the sample application (delete dist
folder, clear caches, etc..).
pnpm clean
Reset the monorepo installation (delete dist
folders, clear caches, delete node_modules
folders, etc..).
pnpm reset
Checks for outdated dependencies. For more information, view PNPM documentation.
pnpm list-outdated-deps
Update outdated dependencies to their latest version. For more information, view PNPM documentation.
pnpm update-outdated-deps
We use GitHub Actions for this repository.
You can find the configuration in the .github/workflows folder and the build results are available here.
We currently have 3 builds configured:
This action runs on a push on the main
branch. If there is a file present in the .changeset
folder, it will publish the new package version on npm.
This action will trigger when a commit is done in a PR to main
or after a push to main
and will run build
, lint-ci
and test
commands on the source code.
This action will trigger when a commit is done in a PR to main
or after a push to main
. The action will generate the documentation website into the retype
branch. This repository Github Pages is configured to automatically deploy the website from the retype
branch.
If you are having issue with the Retype license, make sure the RETYPE_API_KEY
Github secret contains a valid Retype license.