<>
How to Run React BlueKit Locally
cd packages/components
yarn add
gulp
然后在浏览器中导航到地址 http://localhost:8001。
Unit Tests
- One time
npm run test
- Watch
npm run test:watch
- Code coverage
npm run coverage
Style Memoization
带样式的组件默认会在初始化时记住样式解析,因此在应用程序中解析样式非常快。
但出于开发目的,我们需要我们的主题可以动态重新加载。
所以我们添加了 process.env.ALLOW_LIVE_STYLE_RELOAD
来防止记忆。
当您在 BlueKit 下启动组件时,此常量已设置。
SVG Icons
要重新生成或添加新图标,请将它们粘贴到资产文件夹中,然后运行
gulp svg-icon
<>
How to Run React BlueKit Locally
cd packages/components
yarn add
gulp
And then navigate to address http://localhost:8001 in browser.
Unit Tests
- One time
npm run test
- Watch
npm run test:watch
- Code coverage
npm run coverage
Style Memoization
Styled components memoize style resolving on initialization by default, thus resolving styles in application is super fast.
But for development purposes we need our theme to be reloadable on the fly.
So we've added process.env.ALLOW_LIVE_STYLE_RELOAD
which prevents memoization.
When you start components under BlueKit this constant is already set.
SVG Icons
To regenerate or add new icons paste them to assets folder and then run
gulp svg-icon