erisu commented on issue #32: Link `node_modules` during platform creation if it exists URL: https://github.com/apache/cordova/issues/32#issuecomment-426887402 @raphinesse 1. Is it important/necessary to keep the platform binaries? ```apple_ios_version apple_ios_version.bat apple_osx_version apple_osx_version.bat apple_xcode_version apple_xcode_version.bat autotest check_reqs check_reqs.bat cordova_plist_to_config_xml create create.bat lib templates test tests testx uncrustify.cfg uncrustify.sh update update.bat ``` 2. Can we remove them? Currently in question is `create`, but the rest can probably go as well. I believe project creations is typically performed with Cordova CLI. I am not sure how many people actually create a project from the platform package. # Purpose of the question ## The originating problems background Once bundled dependencies were removed, when a platform is added, all of the dependencies are installed into the projects root directory, flattened. Therefore the copy command fails because the `node_modules/cordova-ios/node_modules` directory no longer exists. ## Removing the bug Yes, the best solution is to remove the copy command but there are still test failures to resolve. ## The test failures The failures are coming from `create.spec.js`, an e2e test file. The test uses the `create` binary to create a project. If I attempt to copy the `node_modules` directory into the temp project folder before it is called, create process will fail because it will appear as if the project already exists. ## The question Basically, there were two options that I can think of. If CLI `cordova platform add ios` is the typical pattern, should the ability to create a project from the platform be valid? If not it can be removed. If we want to maintain this option, we can update the binary to pass in a flag within the options argument. The flag could be called `isNotCli: true`, and then update the copy node_modules line to come from the `__dirname` and only called when `isNotCli: true`. The reason for a negated option is so we do not need to update CLI code. Alternative flags could be: `isPlatformBin: true`, ... I am thinking the binaries can be removed and the tests using the binaries as well can be removed. If you have any confusion let me know and I will try to clear it up.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
