From 10970fe10cf9f8320f303a3dda560eda7554d15f Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 5 Dec 2024 08:24:53 +0100 Subject: [PATCH] remove unnecessary build scripts --- build/3_build.js | 74 ---------------------------- build/4_publish.js | 26 ---------- build/plugins/oxfullscreen/plugin.js | 51 ------------------- build/plugins/roxy/plugin.js | 49 ------------------ build/update.sh | 3 -- 5 files changed, 203 deletions(-) delete mode 100644 build/3_build.js delete mode 100644 build/4_publish.js delete mode 100644 build/plugins/oxfullscreen/plugin.js delete mode 100644 build/plugins/roxy/plugin.js delete mode 100755 build/update.sh diff --git a/build/3_build.js b/build/3_build.js deleted file mode 100644 index 822deb0..0000000 --- a/build/3_build.js +++ /dev/null @@ -1,74 +0,0 @@ -/*jslint node:true, curly:false */ -"use strict"; - -var fs = require('fs-extra'), - oxmodule = require('./package.json'), - replace = require('replace'); - - - -// cleanup -fs.moveSync('_module','__module'); -fs.mkdirSync('_module'); -fs.moveSync('__module/.git','_module/.git'); -fs.removeSync('__module'); -fs.emptyDirSync('_master/copy_this/modules/'+ oxmodule.vendor + '/' + oxmodule.name); - -console.log(""); -console.log(" cleanup finished"); - -// copy files -try { - fs.copySync('application', '_module/application'); - fs.copySync('fileman', '_module/fileman'); - fs.copySync('plugins', '_module/plugins'); - fs.copySync('tinymce', '_module/tinymce'); - fs.copySync('LICENSE', '_module/LICENSE'); - fs.copySync('metadata.php', '_module/metadata.php'); - fs.copySync('README.md', '_module/README.md'); - fs.copySync('tinymce.png', '_module/tinymce.png'); - console.log(" new files copied"); -} catch (err) { - console.log(err); -} -// compile some files -var replaces = { - 'empalte': 'emplate', - 'NAME': oxmodule.name, - 'DESCRIPTION': oxmodule.description, - 'VERSION': oxmodule.version + ' ( ' + new Date().toISOString().split('T')[0] + ' )', - 'AUTHOR': oxmodule.author, - 'VENDOR': oxmodule.vendor, - 'COMPANY': oxmodule.company, - 'EMAIL': oxmodule.email, - 'URL': oxmodule.url, - 'YEAR': new Date().getFullYear() -}; - -for (var x in replaces) { - if (!replaces.hasOwnProperty(x)) continue; - replace({ - regex: "___" + x + "___", - replacement: replaces[x], - paths: ['./_module'], - recursive: true, - silent: true - }); -} - -process.on('exit', function (code) { - console.log(" replacing complete"); - // copy module to master - try { - fs.mkdirsSync('_master/copy_this/modules/' + oxmodule.vendor); - fs.copySync('_module', '_master/copy_this/modules/' + oxmodule.vendor + '/' + oxmodule.name); - fs.removeSync('_master/copy_this/modules/' + oxmodule.vendor + '/' + oxmodule.name + '/.git'); - fs.copySync('_module/README.md', '_master/README.md'); - fs.copySync('LICENSE', '_master/LICENSE'); - console.log(""); - console.log(" build complete! made my day!"); - console.log(""); - } catch (err) { - console.log(err); - } -}); \ No newline at end of file diff --git a/build/4_publish.js b/build/4_publish.js deleted file mode 100644 index 212e658..0000000 --- a/build/4_publish.js +++ /dev/null @@ -1,26 +0,0 @@ -/*jslint node:true, curly:false */ -"use strict"; - -var runner = require('child_process'); - -var msg = ( process.argv[2] ? process.argv[2] : "updates"); - -console.log(""); -runner.exec("git add . && git commit -m '"+msg+"' && git push", {cwd: './_master/'}, - function (err, stdout, stderr) { - if(err) console.log(err); - else if(stderr) console.log(stderr); - else console.log("master branch updated"); - } -); -runner.exec("git add . && git commit -m '"+msg+"' && git push", {cwd: './_module/'}, - function (err, stdout, stderr) { - if(err) console.log(err); - else if(stderr) console.log(stderr); - else console.log("module branch updated"); - } -); - -process.on('exit', function (code) { - console.log('publishing finished'); -}); \ No newline at end of file diff --git a/build/plugins/oxfullscreen/plugin.js b/build/plugins/oxfullscreen/plugin.js deleted file mode 100644 index 2f80cf2..0000000 --- a/build/plugins/oxfullscreen/plugin.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file is part of O3-Shop TinyMCE editor module. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with O3-Shop. If not, see - * - * @copyright Copyright (c) 2022 Marat Bedoev, bestlife AG - * @copyright Copyright (c) 2023 O3-Shop (https://www.o3-shop.com) - * @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3) - */ - -/*global tinymce:true */ - -(function () { - 'use strict'; - var PM = tinymce.util.Tools.resolve('tinymce.PluginManager'); - - PM.add('oxfullscreen', function (editor) { - editor.ui.registry.addToggleButton('fullscreen', { - tooltip: 'Fullscreen', - icon: 'fullscreen', - shortcut: 'Meta+Alt+F', - active: false, - onAction: (api) => { - const topframeset = top.document.getElementsByTagName("frameset"); - topframeset[0].setAttribute("cols", (topframeset[0].getAttribute("cols") === "200,*" ? "1px,*" : "200,*")); - topframeset[1].setAttribute("rows", (topframeset[1].getAttribute("rows") === "54,*" ? "1px,*" : "54,*")); - const parentframeset = parent.document.getElementsByTagName("frameset"); - parentframeset[0].setAttribute("rows", (parentframeset[0].getAttribute("rows") === "40%,*" ? "1px,*" : "40%,*")); - api.setActive(!api.isActive()); - } - }); - - return { - getMetadata: () => { - return { - name: "TinyMCE Fullscreen Editing Plugin for O3-Shop", - url: "https://github.com/vanilla-thunder/oxid-module-tinymce" - }; - } - }; - }); -}()); \ No newline at end of file diff --git a/build/plugins/roxy/plugin.js b/build/plugins/roxy/plugin.js deleted file mode 100644 index 6a2050b..0000000 --- a/build/plugins/roxy/plugin.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This file is part of O3-Shop TinyMCE editor module. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with O3-Shop. If not, see - * - * @copyright Copyright (c) 2022 Marat Bedoev, bestlife AG - * @copyright Copyright (c) 2023 O3-Shop (https://www.o3-shop.com) - * @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3) - */ - -(function () { - 'use strict'; - const PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager'); - PluginManager.add('roxy', function (editor) { - editor.settings.file_picker_callback = function ($callback, $value, $meta) { - var url = editor.settings.filemanager_url - + "&type=" + $meta.filetype - + '&value=' + $value - + '&selected=' + $value; - - if (editor.settings.language) { - url += '&langCode=' + editor.settings.language; - } - if (editor.settings.filemanager_access_key) { - url += '&akey=' + editor.settings.filemanager_access_key; - } - - const instanceApi = editor.windowManager.openUrl({ - title: 'Filemanager', - url: url, - width: window.innerWidth, - height: window.innerHeight - 40, - onMessage: function(dialogApi, details) { - $callback(details.content); - instanceApi.close(); - } - }); - }; - }); -}()); \ No newline at end of file diff --git a/build/update.sh b/build/update.sh deleted file mode 100755 index ca0784a..0000000 --- a/build/update.sh +++ /dev/null @@ -1,3 +0,0 @@ -#/bin/bash - -wget https://www.tiny.cloud/tinymce-services-azure/1/package/download?plugins=advlist,anchor,autolink,autoresize,charmap,code,colorpicker,contextmenu,directionality,fullpage,fullscreen,hr,image,importcss,insertdatetime,legacyoutput,link,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,searchreplace,tabfocus,table,textcolor,textpattern,toc,visualblocks,wordcount&themes=modern,inlite,mobile&skins=lightgray&combine=true -o tinymce.zip \ No newline at end of file