Starflow itself doesn't do much apart from providing services and classes to build executables. To let Starflow handle your workflow, you have to follow these few steps:
- write and provide your workflow as a list of steps
- create a new Workflow instance and give it the steps
- register Starflow plugins to the workflow (and specify some aliases if necessary)
- run the workflow
var starflow = require('starflow');
// step 1
var steps = [
'git.stash',
{ '$': ['git', 'checkout', 'master'] },
{ '$': ['git', 'fetch', 'origin', 'master'] },
{ '$': ['git', 'rebase', 'origin/master', 'master'] },
{ 'git.stash': true }
];
// step 2
var workflow = new starflow.Workflow(steps);
return workflow
// step 3
.addPlugin(require('starflow-git'))
.addPlugin(require('starflow-shell'))
.addAliases('$', 'shell.spawn')
// step 4
.run();