Want to contribute to kindle-ui? There are a few things you need to know.
git clone https://github.com/rivertwilight/kindle-ui.git
It's recommended to use vscode workspace to open this project. You can do this by cliking the kindle-ui.codespace file.
Then, run this commands in root folder with Yarn 1.x.
yarn
yarn run dev
Open https://localhost:3000 at your browser and start hacking!.
How does it work?
We use yarn's workspace to manage the dependency, which is enabled in package.json by:
```json
"workspaces": [
"packages/*"
]
```
In the [docs](./packages/docs/) folder, we'll link '@kindle-ui/core' to local version instead of the online so we can test the component locally.
```json
"dependencies": {
"@kindle-ui/core": "workspace:*",
}
```
-
Change the version number in
package.json
of the package you want to update (e.g.@kindle-ui/core
) -
Run these command at the package directory
npm publish
请尝试以下三种解决方案:
-
检查
dist
文件夹是否为空,如果是,运行npm run build
构建生产包,然后运行npm run dev
。 -
检查
playground/node_modules/kindle-ui
是否存在并链接到根目录。 如果没有,你可能需要在playgrpund
文件夹中手动运行npm i ../ -save
。 -
如果 1 和 2 都不起作用,打开两个终端,在第一个终端运行
npm run build-watch
,在另一个终端运行npm run start-playground
。