diff --git a/README.md b/README.md index 47f470a..405499a 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,12 @@
Monkeydo comes as an importable ECMAScript 6 module. In this guide we'll import this directly from a ./modules/ folder, but any web-accesible location will work.
Monkeydo
from your repo clone or download
+ Monkeydo
as an ES6 module
-import { default } from "./modules/Monkeydo/Monkeydo.mjs";
+import { default as Monkeydo } from "./modules/Monkeydo/Monkeydo.mjs";
const methods = {
myJavaScriptMethod: (foo,bar) => {
@@ -52,29 +52,27 @@ const methods = {
}
{
"tasks": [
- [0,"myJavaSriptMethod","I see trees of","green"],
- [300,"myJavaSriptMethod","red","roses too"],
- [160,"myJavaSriptMethod","I see them","bloom"],
- [1200,"myJavaSriptMethod","for","me and you"]
+ [0,"myJavaSriptMethod","Just like a","monkey"],
+ [1200,"myJavaSriptMethod","I've been","dancing"],
+ [160,"myJavaSriptMethod","my whole","life"]
]
}
Monkeydo
with your methods and manifest
+ Monkeydo
with your methods and manifest
-const monkey = new Monkeydo(methods,manifest);
-monkey.do();
+const monkey = new Monkeydo(methods);
+monkey.play(manifest);
The example above would be the same as running:
-console.log("I see trees of","green"); // Right away
-console.log("red","roses too"); // 300 milliseconds after the first
-console.log("I see them","bloom"); // 160 milliseconds after that one
-console.log("for","me and you"); // and lastly, 1200 after that
+console.log("Just like a","monkey"); // Right away
+console.log("I've been","dancing"); // 1.2 seconds after the first
+console.log("my whole","life"); // and then 160 milliseconds after the second