{"push_id":2703144076,"size":1,"distinct_size":1,"ref":"refs/heads/vladimirov/speed-up-add-platform","head":"6539f8660d9c8fd3b56d4888e65dadbd0a3cab97","before":"e0f09062aeb8d4f971be632ad171245aa3f70b3a","commits":[{"sha":"6539f8660d9c8fd3b56d4888e65dadbd0a3cab97","author":{"name":"Rosen Vladimirov","email":"39e5409115ab5a2f6eceacae976cc2f5f727ed87@progress.com"},"message":"feat: Speed up adding native platform\n\nThe current logic for adding native platform is:\n1. Install the runtime package (tns-ios or tns-android) as a dependency\nof the project\n2. Copy all files from the `<project dir>/node_modules/<runtime\npackage>/framework` to `<project dir>/plaforms/<platform>/...` (specific\nplaces there).\n3. Uninstall the runtime package, so it is no longer dependency of the\nproject.\n\nThis solution becomes really slow when the project has a lot of\ndependencies. For example, for `tns-template-master-detail-ng`, all\nthese steps take around 2 mins and 5 seconds on Windows (without SSD)\nand around 40 seconds on macOS (with SSD).\n\nIn order to speed up this process, remove the installing and\nuninstalling of the runtime package. Instead of this, use the `pacote`\npackage to extract the runtime to a directory in the `temp` and copy\nfiles from there to `platforms` directory. As we do not execute `npm\ninstall` and `npm uninstall` with this solution, the operation is not\ndependant on the number of dependencies used in the project. It takes\naround 5-9 second on both Windows and macOS.\n\nAlso remove the usage of `$options` from `npmInstallationManager` - its\npurpose was to work with `--frameworkPath` on `tns platform add\n<platform>` command, but we no longer call `npmInstallationManager` for\nthis case.\n\nFix the tests for `platorm-service`'s addPlatform method as they were\nincorrectly passing.","distinct":true,"url":"https://api.github.com/repos/NativeScript/nativescript-cli/commits/6539f8660d9c8fd3b56d4888e65dadbd0a3cab97"}]}
{"actor":{"display_login":"rosen-vladimirov"}}