From c4ce1edfe0625a3d309b1b87e069b8dd4760feab Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 7 Sep 2023 10:27:48 +0200 Subject: [PATCH] MOBILE-3839 plugin: Copy cordova plugin JS to plugins and ios folders --- cordova-plugin-moodleapp/scripts/copy-javascript.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cordova-plugin-moodleapp/scripts/copy-javascript.js b/cordova-plugin-moodleapp/scripts/copy-javascript.js index 18f287d08..e843ac866 100755 --- a/cordova-plugin-moodleapp/scripts/copy-javascript.js +++ b/cordova-plugin-moodleapp/scripts/copy-javascript.js @@ -22,10 +22,14 @@ const { resolve } = require('path'); const bundle = readFileSync(resolve(__dirname, '../www/index.js')).toString(); const template = readFileSync(resolve(__dirname, './templates/cordova-plugin.js')).toString(); +const pluginsPath = resolve(__dirname, '../../plugins/'); const platformsPath = resolve(__dirname, '../../platforms/'); const filePaths = [ + resolve(pluginsPath, 'cordova-plugin-moodleapp/www/index.js'), resolve(platformsPath, 'android/app/src/main/assets/www/plugins/cordova-plugin-moodleapp/www/index.js'), resolve(platformsPath, 'android/platform_www/plugins/cordova-plugin-moodleapp/www/index.js'), + resolve(platformsPath, 'ios/platform_www/plugins/cordova-plugin-moodleapp/www/index.js'), + resolve(platformsPath, 'ios/www/plugins/cordova-plugin-moodleapp/www/index.js'), ]; const pluginIndex = template .replace('[[PLUGIN_NAME]]', 'cordova-plugin-moodleapp.moodleapp')