raphinesse commented on a change in pull request #1197:
URL: https://github.com/apache/cordova-ios/pull/1197#discussion_r750260037
##########
File path: package.json
##########
@@ -39,6 +40,7 @@
},
"dependencies": {
"cordova-common": "^4.0.2",
+ "cordova-js": "^6.1.0",
Review comment:
Shouldn't this be a `devDependency`?
##########
File path: bin/lib/create.js
##########
@@ -25,9 +25,10 @@ const { CordovaError, events } = require('cordova-common');
const utils = require('./utils');
function copyJsAndCordovaLib (projectPath, projectName, use_shared) {
- fs.copySync(path.join(ROOT, 'CordovaLib', 'cordova.js'),
path.join(projectPath, 'www/cordova.js'));
- fs.copySync(path.join(ROOT, 'cordova-js-src'), path.join(projectPath,
'platform_www/cordova-js-src'));
- fs.copySync(path.join(ROOT, 'CordovaLib', 'cordova.js'),
path.join(projectPath, 'platform_www/cordova.js'));
+ const srcCordovaJsPath = path.join(projectPath, 'www/cordova.js');
+ const platformWwwDir = path.join(projectPath, 'platform_www');
+ fs.ensureDirSync(platformWwwDir);
+ fs.copySync(srcCordovaJsPath, path.join(platformWwwDir, 'cordova.js'));
Review comment:
Since `fs.copySync ` creates missing target directories, the following
should suffice:
```suggestion
fs.copySync(
path.join(projectPath, 'www/cordova.js'),
path.join(projectPath, 'platform_www/cordova.js')
);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]