使用Material-ui的分支版本运行项目
我想开始为material-ui做出贡献,但是在提交请求请求之前,我想在视觉上确认我的更改是否具有预期的效果.我遵循了material-ui.com上的安装"页面,现在可以在本地运行文档,但是我不确定这对我有什么帮助.我想创建一个新的准系统项目,该项目使用我分叉的material-ui.理想情况下,它将使用本地计算机上而不是远程仓库中的material-ui(这将使我能够在本地进行快速更改,而不必每次想查看更改后果时都进行推送).这可能吗?
I want to start contributing to material-ui but before I submit a Pull Request I'd like to visually confirm that my changes have the desired effect. I followed the "install" page at material-ui.com and now I can run docs locally but I'm not sure what that does for me. I'd like to make a new barebones project that uses the material-ui that I have forked. Ideally it would use the material-ui that is on my local machine and not in my remote repo (this would allow me to make quick changes locally rather than having to push every time I want to see the consequences of a change). Is this possible?
您可以使用 npm链接
在 node_modules
,实际上指向您的分叉版本的物理文件夹. https://docs.npmjs.com/cli/link
You can use npm link
to create a material-ui
symbolic link inside node_modules
that actually points to your forked version's physical folder. https://docs.npmjs.com/cli/link
示例:
cd ~/projects/material-ui # go into your forked directory
npm link # creates global link
cd ~/projects/my_project # go into your project directory
npm link material-ui # link-install the package