简体   繁体   English

如何从 github 运行 vue 项目

[英]How to run a vue project from github

I am trying to run this Vue project https://github.com/akumatus/FilterBuilder from Github on my local machine.我正在尝试在我的本地机器上从 Github 运行这个 Vue 项目https://github.com/akumatus/FilterBuilder Usually, I just clone the project and run 'npm install' but in this project, there is no package.json to fetch the dependencies from.通常,我只是克隆项目并运行“npm install”,但在这个项目中,没有 package.json 可以从中获取依赖项。 I am still a vue.js beginner and trying to learn the language so was hoping to run the project on my local machine and play around with it.我仍然是 vue.js 的初学者并试图学习该语言,因此希望在我的本地机器上运行该项目并尝试使用它。

Any suggestions are appreciated.任何建议表示赞赏。

将分支切换到demo并获取,package.json 在那里;)

According to this issue:根据这个问题:

https://github.com/akumatus/FilterBuilder/issues/4 https://github.com/akumatus/FilterBuilder/issues/4

The author suggests to checkout the demo branch and then run the npm install作者建议checkoutdemo分支,然后运行npm install

https://github.com/akumatus/FilterBuilder/tree/demo https://github.com/akumatus/FilterBuilder/tree/demo

Other than that, you could initiate blank vuejs project and add the components to your project, and import them:除此之外,您可以启动空白 vuejs 项目并将组件添加到您的项目中,然后导入它们:

import AndOr from './components/AndOr.vue'
import Rule from './components/Rule.vue'

and then进而

Vue.use('AndOr');
Vue.use('Rule');

before initiating the Vue app在启动 Vue 应用程序之前

After that, use the components according to the README file.之后,根据README文件使用组件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM