Permalink
Browse files

Add an example; How to load flow.js with RequierJS.

  • Loading branch information...
1 parent b2d9803 commit d16bb8a3221ba345f7ec2940e85c2198c5a7a876 @minodisk committed Feb 1, 2012
Showing with 2,079 additions and 1 deletion.
  1. +12 −1 README.md
  2. +15 −0 example/require/index.html
  3. +2,052 −0 example/require/require.js
View
@@ -1,7 +1,7 @@
# flow.js
Asynchronous flow-control (serial, parallel, repeat, wait, function) module for Node.js, RequireJS, and browser.
-## Installation
+## Installation (Node.js)
$ npm install nestableflow
@@ -249,6 +249,17 @@ Set callback `flow.next`.
};
root.start();
+### RequierJS
+
+[How to load flow.js with RequierJS](https://github.com/minodisk/flow-js/blob/master/example/require)
+
+ <script type="text/javascript" src="require.js"></script>
+ <script type="text/javascript">
+ require(['../../lib/flow'], function (Flow) {
+ console.log(Flow);
+ });
+ </script>
+
## License
Licensed under the [MIT license](https://github.com/minodisk/flow-js/raw/master/LICENSE).
View
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>How to load flow.js with RequierJS</title>
+ <script type="text/javascript" src="require.js"></script>
+ <script type="text/javascript">
+ require(['../../lib/flow'], function (Flow) {
+ console.log(Flow);
+ });
+ </script>
+</head>
+<body>
+
+</body>
+</html>
Oops, something went wrong.

0 comments on commit d16bb8a

Please sign in to comment.