add/remove components in noflo-ui

好久不见. 提交于 2019-12-11 12:22:24

问题


I've cloned noflo-ui from github and am running locally but cannot figure out how to add/remove components from the noflo-search box. Ideally, I would like to remove all components from the search results and show only a the ones from my component libraries.

The readme states that libraries can be added by modifying preview/component.json, but removing libraries seems to have no effect. After reading through the docs on components and the spec for component.js I tried editing /component.json, and was also unable to change the results which show in the search box. Furthermore, I can't find any documentation on the .noflo property used in components.json.

Am I doing something wrong or is removing default components not an option?


回答1:


I assume you are using the bundled noflo-browser runtime (iframe). Did you rebuild after editing preview/components.json?

An easier way to use custom component libraries is to do a custom runtime build, for instance based on noflo-app, host it locally, and switch the runtime URL to point there. This also works with app.flowhub.io so no need to build & run noflo-ui locally.




回答2:


In addition to editing preview/component.json, you also have to rebuild the iframe runtime components. To do that, run:

$ grunt build

Note that with newer noflo-ui/Flowhub there is actually no need to build the full UI locally. You can use the hosted Flowhub or even the Chrome app, and simply connect it to an iframe runtime you're running somewhere else:

The noflo-browser-app repo gives a nice base to build these from.



来源:https://stackoverflow.com/questions/29503440/add-remove-components-in-noflo-ui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!