NativeScript/nativescript-cli

Ability to merge ExportOptions.plist from App_Resources and from plugins

開放

#4,528 建立於 2019年4月11日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (204 個分叉)auto 404
featurehelp wanted

倉庫指標

星標
 (1,053 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

It’ll be great to support merging of ExportOptions.plist file from App_Resources and from plugins. This way every user will be able to add custom options to this file and NativeScript CLI will merge them with the default options. Also, every plugin author will be able to add such custom options in platforms/ios folder of the plugin in case when it is required.

Currently NativeScript CLI supports merging of Info.plist files from plugins and from App_Resources. As the format of ExportOptions.plist and Info.plist is the same (the both files are .plist format), it seems the merging of ExportOptions.plist should be very similar to the merging of Info.plist files. Here is the code that merges Info.plist files. The mergeInfoPlists function has hardcoded path to the Info.plist file. It seems the common logic of this function can be extracted to a separate function, for example mergePlistFile. After that we can call this function for Info.plist and ExportOptions.plist:

mergePlistFile(<path to Info.plist>);
mergePlistFile(<path to ExportOptions.plist>);

貢獻者指南