NativeScript / nativescript-dev-typescript

TypeScript support for NativeScript projects
Apache License 2.0
21 stars 10 forks source link

Use bundle and release options from hookArgs #36

Closed rosen-vladimirov closed 6 years ago

rosen-vladimirov commented 6 years ago

In case CLI is used as a library, the $options is not populated with correct values. So the --release that would normally be passed to command-line, is not set and the $options.release is always false. Same is valid for the bundle flag. Instead of using the flags from $options use them from the hookArgs. The prepare method has appFilesUpdaterOptions, which contain the information for bundle and release options. Use it instead and for backwards compatibility use the $options.