Assign path alias using tsconfig.json file
The following instructions are for those who want to develop the armit core framework or plugins (e.g. if you intend to make a pull request). For instructions on how to build a project using Armit, please see the Getting Started guide.
yarn
npm install commitizen -g
The root directory has a package.json
which contains build-related dependencies for tasks including:
- Building & deploying the docs
- Generating TypeScript types from the GraphQL schema
- Linting, formatting & testing tasks to run on git commit & push
yarn set version berry
yarn plugin import workspace-tools
yarn install
This runs the yarn "install" command, will scan those directories and look for children package.json
. Their content is used to define the workspace topology (core, common, dependencies...), and cross-links monorepo dependencies.
yarn g:test-unit
yarn g:lint
yarn g:typecheck
yarn g:build
Optional
If you need to share some packages outside of the monorepo, you can publish them to npm or private repositories. An example based on tsup is present in each package. Versioning and publishing can be done with atlassian/changeset, and it's simple as typing:
$ yarn g:changeset
$ git cz
Follow the instructions... and commit the changeset file. A "Version Packages" P/R will appear after CI checks. When merging it, a github action will publish the packages with resulting semver version and generate CHANGELOGS for you.
The global commands yarn deps:update
will help to maintain the same versions across the entire monorepo.
They are based on the excellent npm-check-updates
(see options, i.e: yarn check:deps -t minor
).
After running
yarn deps:update
, ayarn install
is required. To prevent having duplicates in the yarn.lock, you can runyarn dedupe --check
andyarn dedupe
to apply deduplication. The duplicate check is enforced in the example github actions.
6.1 VSCode
The armit have full setting for vscode workspace (armit.code-workspace
) that the eslint.workingDirectories
setting is set: just open it.
More info here