- run all scripts only with yarn;
- all package installations must be performed with
-W
flag, to ensure their installation into workspaces;
start
– start development instance of thestorybook
environment;format
,lint
,typecheck
– check code style and types;clear
– delete all build-related files and directories;tsconfig
,package
– create publish-readytsconfig.json
andpackage.json
inside each package;prebuild
,build:js
,build:dts
,build
– prepare and build every package;ci
– run the ci pipeline: lint and check types, clear old build and prepare new build, test the code;
- In components can't be used native tag prop names. For example in
<Button>
component in Figma we can't use custom prop "type" because it's a registered HTML<button>
tag property name.
Don't forget to add package in root package.json and add "references" in tsconfig.build.json and paths in tsconfig.json
For example packageA - form, packageB - button. And we are going to integrate button to form.
cd packageA
Add "dependencies": {"@scaleflex/packageB": "^0.1.0"}
in packageA/package.json by command:
lerna add @scaleflex/packageB --scope=@scaleflex/packageA
Go to root dir and update siblings
cd ../../
lerna bootstrap
yarn build
Notice! Few times there were issue in VSCode when it was necessary to restart editor to use
import {...} from '@scaleflex/packageB'