-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.rename to Flow 2.remove buster test 3.add nest flow control
- Loading branch information
Showing
15 changed files
with
913 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "bower_components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text = auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
node_modules | ||
dist | ||
.idea | ||
.tmp | ||
.DS_Store | ||
*.log | ||
|
||
|
||
bower_components/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
module.exports = function (grunt) { | ||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | ||
|
||
grunt.initConfig({ | ||
jshint: { | ||
|
||
}, | ||
clean: { | ||
dist: { | ||
|
||
} | ||
}, | ||
watch: { | ||
|
||
}, | ||
concat:{ | ||
|
||
} | ||
}); | ||
|
||
|
||
grunt.registerTask('server', function () { | ||
|
||
}); | ||
|
||
grunt.registerTask('build', function () { | ||
|
||
}); | ||
|
||
grunt.registerTask('test', function () { | ||
|
||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Jumper | ||
Flow | ||
====== | ||
|
||
function flow control library | ||
Flow control library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "Flow", | ||
"version": "0.5.0", | ||
"dependencies": { | ||
"jquery": "~1.9.1", | ||
"underscore": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Example</title> | ||
<script type="text/javascript" src="../underscore.js"></script> | ||
<script type="text/javascript" src="../jumper.js"></script> | ||
<meta charset="UTF-8"/> | ||
<title>Example</title> | ||
<script type="text/javascript" src="../src/Flow.js"></script> | ||
</head> | ||
<body> | ||
<h1>Results in the console</h1> | ||
<script type="text/javascript"> | ||
var processExemple = new Jumper( | ||
function(a,b,c){ | ||
// If you want to using the once function, you have to give a name for the function | ||
// like once and onceInAll | ||
<h1>Results in the console</h1> | ||
<script type="text/javascript"> | ||
var processExemple = new Flow( | ||
function (a, b, c) { | ||
// If you want to using the once function, you have to give a name for the function | ||
// like once and onceInAll | ||
|
||
this.onceInAll('t11', function(){ | ||
console.log('ALL 1-1'); // Just run once even you back to this step | ||
}); | ||
console.log(1); | ||
this.once('t12', function(){ | ||
console.log('Step 1-2 param:' +a +b+c); // Run once every time go to this step | ||
}); | ||
} | ||
,function(e,f,g){ | ||
console.log(2); | ||
this.once('t22',function(){ | ||
console.log('Step 2-1 param:'+e+f+g); | ||
}); | ||
} | ||
,function(){ | ||
console.log(3); | ||
} | ||
,function(){ | ||
console.log(4); | ||
} | ||
,function(){ | ||
console.log(5); | ||
}).go(1,2,3).go(4,5,6).go().go().go().back().back().back(4,5,6).action().back(1,2,3).action(); | ||
// Here you can pass the args with go(),back(),action() for functions | ||
</script> | ||
this.onceInAll('t11', function () { | ||
console.log('ALL 1-1'); // Just run once even you back to this step | ||
}); | ||
console.log(1); | ||
this.once('t12', function () { | ||
console.log('Step 1-2 param:' + a + b + c); // Run once every time go to this step | ||
}); | ||
} | ||
, function (e, f, g) { | ||
console.log(2); | ||
this.once('t22', function () { | ||
console.log('Step 2-1 param:' + e + f + g); | ||
}); | ||
} | ||
, new Flow(function () { | ||
console.log("Sub flow 3.1"); | ||
}, function () { | ||
console.log("Sub flow 3.2"); | ||
}, new Flow() | ||
) | ||
, function () { | ||
console.log(4); | ||
} | ||
, function () { | ||
console.log(5); | ||
}).go(1, 2, 3).go(4, 5, 6).go().go().go().go().go() | ||
.go().go().go().go().go().go().go() | ||
.back().back().back().back(4, 5, 6).action().back(1, 2, 3).action(); | ||
// Here you can pass the args with go(),back(),action() for functions | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title>Example with underscore</title> | ||
<script type="text/javascript" src="../bower_components/underscore/underscore.js"></script> | ||
<script type="text/javascript" src="../src/Flow_underscore.js"></script> | ||
</head> | ||
<body> | ||
<h1>Results in the console</h1> | ||
<script type="text/javascript"> | ||
var processExemple = new Flow( | ||
function (a, b, c) { | ||
// If you want to using the once function, you have to give a name for the function | ||
// like once and onceInAll | ||
|
||
this.onceInAll('t11', function () { | ||
console.log('ALL 1-1'); // Just run once even you back to this step | ||
}); | ||
console.log(1); | ||
this.once('t12', function () { | ||
console.log('Step 1-2 param:' + a + b + c); // Run once every time go to this step | ||
}); | ||
} | ||
, function (e, f, g) { | ||
console.log(2); | ||
this.once('t22', function () { | ||
console.log('Step 2-1 param:' + e + f + g); | ||
}); | ||
} | ||
, new Flow(function () { | ||
console.log("Sub flow 3.1"); | ||
}, function () { | ||
console.log("Sub flow 3.2"); | ||
}, new Flow() | ||
) | ||
, function () { | ||
console.log(4); | ||
} | ||
, function () { | ||
console.log(5); | ||
}).go(1, 2, 3).go(4, 5, 6).go().go().go().go().go() | ||
.go().go().go().go().go().go().go() | ||
.back().back().back().back(4, 5, 6).action().back(1, 2, 3).action(); | ||
// Here you can pass the args with go(),back(),action() for functions | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.