NoFlo headless runner
This utility enables proxying NoFlo postMessage runtimes running in a headless browser to the FBP protocol WebSocket transport.
The primary use case for this is enabling NoFlo browser components and applications to be tested with fbp-spec on the command-line (for example, inside a Continuous Integration system).
Requirements
You need a browser build of NoFlo and your components that exposes the noflo-runtime-postmessage
library via window.require()
. If you're building your libraries with grunt-noflo-browser, this will already be the case.
For custom builds, the easiest way to do this is by adding something like the following to your WebPack entry file:
const postMessageRuntime = ; const exported = 'noflo-runtime-postmessage': postMessageRuntime; { if exportedmoduleName return exportedmoduleName; throw `Module not available`;} if window windowrequire = requireModule;
Running
Start the runtime with:
$ npx noflo-runtime-headless --file path/to/my/file.js
You can also let fbp-spec start the runtime for you:
$ npx fbp-spec --address ws://localhost:3569 --command \"noflo-runtime-headless -f path/to/my/file.js\" spec/*.yaml
Changes
- 0.2.0 (Oct 13 2020)
- Released with updated dependencies
- 0.1.0 (Sep 23 2018)
- Initial version