0.0.1 • Published 8 years ago

wflo v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

wflo.js - flow diagram programming language

work in progress

(c) 2016 Andrey Gershun agershun@gmail.com

Getting Started

Installation

in Node.js

> npm install wflo

then add this module into your script:

var wflo = require('wflo');

in browser

Copy wflo.js file into the folder, then include this file in the header:

<script src="wflo.js"></script>

in browser (AMD)

require('wflo', [], function(wflo){
	// ... your code is here
})

command-line interface

Install Wflo globally:

> npm install -g wflo

First Steps

Create and run the very first wind

var w = new wflo.Wind;
var n1 = w.add('"Hello World"');
var n2 = w.add('console.log');
w.link(n1,n2);
w.run();

A .run() function is asyncronous and it returns a promise, so you can use standard .then() and .catch() functions.

var w = new wflo.Wind;
w.add('console.log',"Hello World!");
w.run().then(function(){
	console.log('Done.')
}).catch(function(err){
	console.log('Something is wrong.')
});