add/remove components in noflo-ui

2019-08-08 06:57发布

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?

标签: noflo
2条回答
走好不送
2楼-- · 2019-08-08 07:45

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.

查看更多
Juvenile、少年°
3楼-- · 2019-08-08 07:59

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:

Click on the two arrows to change the runtime

Click custom iframe URL

Select the URL you want to connect to

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

查看更多
登录 后发表回答