You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/03 10:52:16 UTC

[GitHub] erisu closed pull request #62: Only copy platform node_modules when created by binary

erisu closed pull request #62: Only copy platform node_modules when created by binary
URL: https://github.com/apache/cordova-browser/pull/62
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/create b/bin/create
index 6d73745..9f5ee95 100755
--- a/bin/create
+++ b/bin/create
@@ -85,6 +85,7 @@ else {
         cli: argv.cli,
         link: argv.link || argv.shared,
         customTemplate: argv.argv.remain[3],
+        copyPlatformNodeModules: true
     };
 
     Api.createPlatform(projectPath, config, options);
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 667d9ff..50f529b 100644
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -27,7 +27,7 @@ var events = require('cordova-common').events;
 var check_reqs = require('./check_reqs');
 
 // exported method to create a project, returns a promise that resolves with null
-module.exports.createProject = function (project_path, package_name, project_name) {
+module.exports.createProject = function (project_path, package_name, project_name, options) {
 /*
     // create the dest and the standard place for our api to live
     // platforms/platformName/cordova/Api.js
@@ -58,8 +58,7 @@ module.exports.createProject = function (project_path, package_name, project_nam
     shell.cp('-r', path.join(ROOT, 'bin/template/www'), project_path);
 
     // recreate our node_modules structure in the new project
-    shell.cp('-r', path.join(ROOT, 'node_modules'),
-        path.join(project_path, 'cordova'));
+    if (options && options.copyPlatformNodeModules) shell.cp('-r', path.join(ROOT, 'node_modules'), path.join(project_path, 'cordova'));
 
     // copy check_reqs file
     shell.cp(path.join(ROOT, 'bin/lib/check_reqs.js'),


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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