cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject git commit: Create now adds directories for prepapre+compile hooks.also added tests fro this.
Date Fri, 15 Feb 2013 23:14:25 GMT
Updated Branches:
  refs/heads/master d3a59100b -> 4304acb0c


Create now adds directories for prepapre+compile hooks.also added tests fro this.


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/4304acb0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/4304acb0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/4304acb0

Branch: refs/heads/master
Commit: 4304acb0c50de136b01c4fc6a7bc261958fc86ea
Parents: d3a5910
Author: Fil Maj <maj.fil@gmail.com>
Authored: Fri Feb 15 15:14:19 2013 -0800
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Fri Feb 15 15:14:19 2013 -0800

----------------------------------------------------------------------
 spec/create.spec.js |    4 ++++
 src/create.js       |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4304acb0/spec/create.spec.js
----------------------------------------------------------------------
diff --git a/spec/create.spec.js b/spec/create.spec.js
index 80262d6..fcb3e76 100644
--- a/spec/create.spec.js
+++ b/spec/create.spec.js
@@ -20,6 +20,8 @@ describe('create command', function () {
         var hooks = path.join(tempDir, '.cordova', 'hooks');
         expect(fs.existsSync(hooks)).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'before_platform_add'))).toBe(true);
+        expect(fs.existsSync(path.join(hooks, 'before_prepare'))).toBe(true);
+        expect(fs.existsSync(path.join(hooks, 'before_compile'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'after_platform_add'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'before_platform_rm'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'after_platform_rm'))).toBe(true);
@@ -31,6 +33,8 @@ describe('create command', function () {
         expect(fs.existsSync(path.join(hooks, 'after_plugin_rm'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'before_plugin_ls'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'after_plugin_ls'))).toBe(true);
+        expect(fs.existsSync(path.join(hooks, 'after_prepare'))).toBe(true);
+        expect(fs.existsSync(path.join(hooks, 'after_compile'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'before_build'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'after_build'))).toBe(true);
         expect(fs.existsSync(path.join(hooks, 'before_emulate'))).toBe(true);

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4304acb0/src/create.js
----------------------------------------------------------------------
diff --git a/src/create.js b/src/create.js
index 46f1213..c2f20bd 100644
--- a/src/create.js
+++ b/src/create.js
@@ -65,6 +65,7 @@ module.exports = function create (dir, id, name) {
 
     // Add directories for hooks
     shell.mkdir(path.join(hooks, 'after_build'));
+    shell.mkdir(path.join(hooks, 'after_compile'));
     shell.mkdir(path.join(hooks, 'after_docs'));
     shell.mkdir(path.join(hooks, 'after_emulate'));
     shell.mkdir(path.join(hooks, 'after_platform_add'));
@@ -73,7 +74,9 @@ module.exports = function create (dir, id, name) {
     shell.mkdir(path.join(hooks, 'after_plugin_add'));
     shell.mkdir(path.join(hooks, 'after_plugin_ls'));
     shell.mkdir(path.join(hooks, 'after_plugin_rm'));
+    shell.mkdir(path.join(hooks, 'after_prepare'));
     shell.mkdir(path.join(hooks, 'before_build'));
+    shell.mkdir(path.join(hooks, 'before_compile'));
     shell.mkdir(path.join(hooks, 'before_docs'));
     shell.mkdir(path.join(hooks, 'before_emulate'));
     shell.mkdir(path.join(hooks, 'before_platform_add'));
@@ -82,6 +85,7 @@ module.exports = function create (dir, id, name) {
     shell.mkdir(path.join(hooks, 'before_plugin_add'));
     shell.mkdir(path.join(hooks, 'before_plugin_ls'));
     shell.mkdir(path.join(hooks, 'before_plugin_rm'));
+    shell.mkdir(path.join(hooks, 'before_prepare'));
 
     // Write out .cordova/config.json file with a simple json manifest
     fs.writeFileSync(path.join(dotCordova, 'config.json'), JSON.stringify({


Mime
View raw message