From a6b8ee93cd87f77619322d59d11aa9859e203e81 Mon Sep 17 00:00:00 2001 From: volterra79 Date: Tue, 11 Feb 2025 09:36:05 +0100 Subject: [PATCH 1/3] :bug: Copy plugin.js to plugin code folder after build completion --- gulpfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 1352a6440..d330040de 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -163,7 +163,9 @@ const build_plugin = async (pluginName) => { name: 'onBuildEnd', setup(build) { build.onEnd(result => { - console.log(GREEN__ + '[' + pluginName + ']' + __RESET + ' → ' + Math.round(fs.statSync(`${outputFolder}/plugin.js`).size / 1024) + 'KB') + console.log(GREEN__ + '[' + pluginName + ']' + __RESET + ' → ' + Math.round(fs.statSync(`${outputFolder}/plugin.js`).size / 1024) + 'KB'); + // Copy plugin.js to plugin code folder + fs.cpSync(`${outputFolder}plugin.js`, `${g3w.pluginsFolder}/${pluginName}/plugin.js`); resolve(); }) }, From b1cdd25b4c74ae50b5a9c89fe0f8b382b130706a Mon Sep 17 00:00:00 2001 From: volterra79 Date: Tue, 11 Feb 2025 09:43:00 +0100 Subject: [PATCH 2/3] :bug: Fix path for plugin.js in build output logging --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index d330040de..d53744984 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -163,7 +163,7 @@ const build_plugin = async (pluginName) => { name: 'onBuildEnd', setup(build) { build.onEnd(result => { - console.log(GREEN__ + '[' + pluginName + ']' + __RESET + ' → ' + Math.round(fs.statSync(`${outputFolder}/plugin.js`).size / 1024) + 'KB'); + console.log(GREEN__ + '[' + pluginName + ']' + __RESET + ' → ' + Math.round(fs.statSync(`${outputFolder}plugin.js`).size / 1024) + 'KB'); // Copy plugin.js to plugin code folder fs.cpSync(`${outputFolder}plugin.js`, `${g3w.pluginsFolder}/${pluginName}/plugin.js`); resolve(); From 89bbfb45ac1ab88dc419b357c75c55592946bca0 Mon Sep 17 00:00:00 2001 From: Raruto Date: Tue, 11 Feb 2025 10:31:57 +0100 Subject: [PATCH 3/3] comments --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index d53744984..77a39f081 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -164,7 +164,7 @@ const build_plugin = async (pluginName) => { setup(build) { build.onEnd(result => { console.log(GREEN__ + '[' + pluginName + ']' + __RESET + ' → ' + Math.round(fs.statSync(`${outputFolder}plugin.js`).size / 1024) + 'KB'); - // Copy plugin.js to plugin code folder + // Add "plugin.js" to git repository (eg. ./src/editing/plugin.js) fs.cpSync(`${outputFolder}plugin.js`, `${g3w.pluginsFolder}/${pluginName}/plugin.js`); resolve(); })