[
https://issues.apache.org/jira/browse/CB-8965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602107#comment-14602107
]
ASF GitHub Bot commented on CB-8965:
------------------------------------
Github user stevengill commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/252#discussion_r33314883
--- Diff: cordova-lib/src/cordova/platform.js ---
@@ -161,8 +161,17 @@ function addHelper(cmd, hooksRunner, projectRoot,
targets, opts) {
}
return superspawn.spawn(bin, args, copts);
}).then(function() {
- copy_cordova_js(projectRoot, platform);
- copy_cordovajs_src(projectRoot, platform,
platDetails.libDir);
+ var platform_www = path.join(projectRoot, 'platforms',
platform, 'platform_www');
+
+ // only want to copy cordova_js once, when the
platform is added
+ if (!fs.existsSync(path.join(platform_www,
'cordova.js'))) {
+ copy_cordova_js(projectRoot, platform);
+ }
+
+ // only want to copy cordova-js-src once, when the
platform is added
+ if (!fs.existsSync(path.join(platform_www,
'cordova-js-src'))) {
--- End diff --
Keep this check as we are moving this functionality to platform create
scripts and don't want to run this command again if it already exists.
> copy platform specific cordova-js into cordova projects platform_www
> --------------------------------------------------------------------
>
> Key: CB-8965
> URL: https://issues.apache.org/jira/browse/CB-8965
> Project: Apache Cordova
> Issue Type: Sub-task
> Components: CordovaJS, CordovaLib
> Reporter: Steve Gill
> Assignee: Steve Gill
>
> Going to get each platforms cordova-js-src directory to be copied into
> platform_www for each platform on cordova platform add. We need these files
> to include when generating cordova.js if using the --browserify flag.
> The parsers will be updated with the location of cordova-js-src for each
> platform and cordova-lib/src/cordova/platforms.js will be updated to copy
> cordova-js-src directory into platform_www.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]