Resolve issue with plugin target-dir="app*" subdirs (#572)

(subdirectories) such as "appco", with unit tests to verify

Needed for @katzer plugins that use de/appplant subdirectory,
for example:
* cordova-plugin-local-notifications
* cordova-plugin-badge
* cordova-plugin-background-mode

Also needed for cordova-plugin-inappbrowser

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Julio César <jcesarmobile@gmail.com>
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
This commit is contained in:
Chris Brody
2018-11-22 08:59:33 -05:00
committed by GitHub
parent a014228f7c
commit ef2434188e
3 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -295,7 +295,7 @@ function generateAttributeError (attribute, element, id) {
function getInstallDestination (obj) {
var APP_MAIN_PREFIX = 'app/src/main';
if (obj.targetDir.includes('app')) {
if (obj.targetDir.startsWith('app')) {
// If any source file is using the new app directory structure,
// don't penalize it
return path.join(obj.targetDir, path.basename(obj.src));