From b123777ed247f590bc653617bfcb71ab07e38e17 Mon Sep 17 00:00:00 2001 From: Austen Collins Date: Wed, 14 Oct 2015 16:19:52 -0700 Subject: [PATCH] fix temp file --- lib/RyansPlugin.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/RyansPlugin.js b/lib/RyansPlugin.js index 46f82afdf..e92078236 100644 --- a/lib/RyansPlugin.js +++ b/lib/RyansPlugin.js @@ -19,8 +19,13 @@ class RyansPlugin extends JawsPlugin { */ registerActions() { this.Jaws.action('ProjectCreate', this._actionProjectCreate()); + return Promise.resolve(); + } + + registerHooks() { this.Jaws.hook('PostProjectCreate', this._hookPostProjectCreate()); this.Jaws.hook('PreProjectCreate', this._hookPreProjectCreate()); + this.Jaws.hook('PostProjectCreate', this._hookPostProjectCreate2()); return Promise.resolve(); } @@ -53,6 +58,18 @@ class RyansPlugin extends JawsPlugin { return; } } + + _hookPostProjectCreate2() { + return function*() { + console.log('hook post project 2 create fired'); + var testPushBack1 = yield Promise.resolve('test push back 1 success!') + var testPushBack2 = yield Promise.delay(2000).then(function() { + return 'test push back 2 success!'; + }); + console.log("hook post project 2 create done...", testPushBack1, testPushBack2); + return; + } + } } module.exports = RyansPlugin; \ No newline at end of file