1.8 KiB
Contributing to L7
👍🎉 Welcome to contribute code to L7! 🎉👍
Pre-installation
Install Yarn
Since Yarn workspace is used, Yarn needs to be installed first: https://yarnpkg.com/en/docs/install#windows-stable
Windows environment configuration
The L7 test solution relies on headless-gl, which requires node-gyp to compile local dependencies.
- Start PowerShell as an administrator
- Run
npm install --global --production windows-build-tools
to install Microsoft's windows-build-tools
See other issues during installation.
Install dependencies
Install dependencies and complete Yarn workspace initialization:
yarn install
Windows
copy node_modules/gl/deps/windows/dll/x64/*.dll c:\windows\system32
Run DEMO
Start each package code change monitoring:
yarn watch
Start Storybook, it will automatically open http://localhost:6006/
:
yarn storybook
Run test
Run unit tests:
yarn test
Run unit tests and view code coverage:
yarn coveralls
Add Lerna package
Add a new lerna package:
lerna create my-pack -y
Use ui-lib as a dependency of my-pack:
yarn workspace my-pack add ui-lib/1.0.0
Add lodash as a dependency of all packages (excluding root)
yarn workspaces run add lodash
Set typescript to root development dependency:
yarn add -W -D typescript jest
Submit code
Instead of git commit
:
yarn commit
release
Set the version number
yarn run version:prerelease
After setting, you need to commit the code
release
yarn run release