使用Material-ui的分支版本运行项目 [英] Running a project with forked version of material-ui

查看:61
本文介绍了使用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

这篇关于使用Material-ui的分支版本运行项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆