- Choose main development branch -
master - Install npm packages by running
npm install - Initiate some tools for development by command
npx postinstall - Build dependencies for packages
npm run build - Launch storybook
npm start
build- build production version of all entities to folderclean- remove folder with production version of all entitieslint- check all entities files for errors by linterstest- start all entities testspostinstall- initiate some tools for developmentbuild:storybook- buildstorybookwith all entities stories to folderprettier:check- check all files byprettierprettier:write- fix all files byprettierstart- startstorybookserver with all entities stories on localhost:6009
- To add a new entity create a new branch
feature/new-entity-namefrom branchnext - By using
hygencreate a folder with files for a new entity
4.1. If you are usinghygenat first time, you need to install (npm install -global hygen). More abouthygen
4.2. To create a folder for your entity, use commandnpx hygen create entity-type(entity types:component,hook) - Develop new entity with tests and stories
- Check that building production version, tests, stories and linters run without problems
- Push your branch and create a PR on GitHub to merge it to the
nextbranch
build- build production version of entity to folderclean- remove folder with production version of entitylint- check entity files for errors by linterstest- start tests inside entity folder
There are two ways to define workspaces:
- Inline in root
vitest.config.mts - In root config with glob string and vitest.config.ts in each workspace/package. Example:
import { defineProject, mergeConfig } from 'vitest/config';
import configShared from '../../vitest.config';
/**
* vitest.config for correct vitest workspace detection.
* export default configShared works too.
*/
export default mergeConfig(configShared, defineProject({
test: {
include: ['**/*.tests.(ts|tsx)'],
setupFiles: ['../../setupTests.ts'],
}
}));Command for execute only one package:
vitest run --root ../../ --project hooks"