flower.js
v1.0.2
Published
Better logic flow. Create and visualize complex decision trees with ease.
Maintainers
Readme
Flower
NPM module for improved logic flow. Create and visualize complex decision trees with ease.
- Installation
- Documentation
- [Project Structure](#Project Structure)
##Installation It's recommended to install the NPM package globally. By doing so NPM will automatically add the command to PATH.
npm install -g flower.jsTo verify the installation run:
flower testExpected output:
> Successful installation##Documentation
Editor
Currently the only supported editor is *draw.io, a popular open source flowchart editor.
*a specially designed fork of which, will come soon.
Example
This is an example of a program. You can find at /demo
!
The example project comes with a file named "foo.js". This script is responsible with calling functions from the compiled chart and passing available parameters.
//Import chart const bar = require('./bar'); //Variables used in chart available_parameters = { counter: 7, print: function(arg1) { console.log('print: %s', arg1); } }; //Call first function and pass parameters used by the flowchart. bar.Parent(available_parameters);Exporting
To export a flowchart select 'File/Export as/XML'
!
Export as uncompressed XML.
*If this isn't an option please make sure you only have one page in the document.
!
Compiling
After having installed the library and saved your flowchart in the appropriate folder you can compile it into java script with the following command:
flower compile -s demo/draw_chart.xml -d demo/bar.jsWhere
-sis the source xml file and-dthe destination for the compiled js file.
ToDo: <Project Structure>
If you intend to contribute to the project this guide will aid you in understanding the project structure and TODO's
