You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current logic for adding native platform is:
1. Install the runtime package (tns-ios or tns-android) as a dependency
of the project
2. Copy all files from the `<project dir>/node_modules/<runtime
package>/framework` to `<project dir>/plaforms/<platform>/...` (specific
places there).
3. Uninstall the runtime package, so it is no longer dependency of the
project.
This solution becomes really slow when the project has a lot of
dependencies. For example, for `tns-template-master-detail-ng`, all
these steps take around 2 mins and 5 seconds on Windows (without SSD)
and around 40 seconds on macOS (with SSD).
In order to speed up this process, remove the installing and
uninstalling of the runtime package. Instead of this, use the `pacote`
package to extract the runtime to a directory in the `temp` and copy
files from there to `platforms` directory. As we do not execute `npm
install` and `npm uninstall` with this solution, the operation is not
dependant on the number of dependencies used in the project. It takes
around 5-9 second on both Windows and macOS.
Also remove the usage of `$options` from `npmInstallationManager` - its
purpose was to work with `--frameworkPath` on `tns platform add
<platform>` command, but we no longer call `npmInstallationManager` for
this case.
Fix the tests for `platorm-service`'s addPlatform method as they were
incorrectly passing.
0 commit comments