cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject spec commit: Add --linkplugins flag to createmobilespec.js to enable `plugin add --link`
Date Fri, 09 Jan 2015 02:27:17 GMT
Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master fb974d116 -> 2af6fbfdb


Add --linkplugins flag to createmobilespec.js to enable `plugin add --link`


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/2af6fbfd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/2af6fbfd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/2af6fbfd

Branch: refs/heads/master
Commit: 2af6fbfdb62535c3e490645501cce4c51b3bdedc
Parents: fb974d1
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jan 8 21:26:34 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Jan 8 21:26:34 2015 -0500

----------------------------------------------------------------------
 createmobilespec/createmobilespec.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/2af6fbfd/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index 4f874bc..0a910c3 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -114,6 +114,7 @@ var top_dir =             process.cwd() + path.sep,
                                                "\t\t\tCannot be used with --global because
it is implied when --global is used.")
                    .boolean("skiplink").describe("skiplink", "Do not check 'npm link' of
our own dependent modules such as cordova-lib when on master.\n" +
                                                  "\t\t\tUse only when you know what you are
doing, this should be very rare.")
+                   .boolean("linkplugins").describe("linkplugins", "Use the --link flag when
running `cordova plugin add`.\n")
                    .alias("h", "help")
                    .argv;
 
@@ -422,13 +423,14 @@ function installPlugins() {
         pushd(cli_project_dir);
         // we do need local plugin-test-framework
         console.log("Installing local test framework plugins...");
-        shelljs.exec(cli + " plugin add org.apache.cordova.test.whitelist org.apache.cordova.test.echo
--searchpath " + mobile_spec_git_dir);
-        shelljs.exec(cli + " plugin add org.apache.cordova.test-framework --searchpath "
+ top_dir);
+        var linkFlag = argv.linkplugins ? ' --link' : '';
+        shelljs.exec(cli + " plugin add org.apache.cordova.test.whitelist org.apache.cordova.test.echo
--searchpath " + mobile_spec_git_dir + linkFlag);
+        shelljs.exec(cli + " plugin add org.apache.cordova.test-framework --searchpath "
+ top_dir + linkFlag);
         
         if (argv.globalplugins) {
-            shelljs.exec(cli + " plugin add " + path.join(mobile_spec_git_dir, "dependencies-plugin"));
+            shelljs.exec(cli + " plugin add " + path.join(mobile_spec_git_dir, "dependencies-plugin")
+ linkFlag);
         } else {
-            shelljs.exec(cli + " plugin add " + path.join(mobile_spec_git_dir, "dependencies-plugin")
+ searchpath);
+            shelljs.exec(cli + " plugin add " + path.join(mobile_spec_git_dir, "dependencies-plugin")
+ searchpath + linkFlag);
         }
 
         // Install new-style test plugins
@@ -440,7 +442,7 @@ function installPlugins() {
             pluginTestPaths.push(path.dirname(potential_tests_plugin_xml));
           }
         });
-        shelljs.exec(cli + " plugin add " + pluginTestPaths.join(' '));
+        shelljs.exec(cli + " plugin add " + pluginTestPaths.join(' ') + linkFlag);
 
         popd();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message