Platform files download


#1

How can I avoid downloading platform files for every app I want to run. How can I have it offline and reuse them when ever I want?


#2

You could download the npm module tarballs (tgz - zips) as explained in the SO response - https://stackoverflow.com/a/33549885/6408287.

So that would mean for the android runtime you would do npm pack tns-android; npm pack tns-ios for iOS development respectively.

Afterwards whenever you re-add the platform you want to pass the --framework-path flag, followed by relative or absolute path to the tarball.

A sequence of all the steps would look something like this:

npm pack tns-android
tns create myApp
cd myApp
npm i
tns platform add android --framework-path ../tns-android.tgz
tns run android

That of course assumes that you have a stable network connection to download the other npm dependencies needed in the process of creating an application and installing its dependencies.