From 339792917695427d81a34f9d19e4393c5a750ce3 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 13 Mar 2020 17:06:13 +0300 Subject: [PATCH] refactor(core): remove icon plugin from flextype core #414 --- site/plugins/icon/LICENSE.txt | 21 --------- site/plugins/icon/README.md | 8 ---- .../icon/app/Controllers/IconController.php | 45 ------------------- site/plugins/icon/bootstrap.php | 40 ----------------- site/plugins/icon/composer.json | 34 -------------- site/plugins/icon/dependencies.php | 15 ------- site/plugins/icon/gulpfile.js | 16 ------- site/plugins/icon/lang/en_US.yaml | 2 - site/plugins/icon/lang/ru_RU.yaml | 2 - site/plugins/icon/package.json | 23 ---------- site/plugins/icon/plugin.yaml | 11 ----- site/plugins/icon/settings.yaml | 2 - .../shortcodes/IconShortcodeExtension.php | 17 ------- site/plugins/icon/twig/IconTwigExtension.php | 36 --------------- 14 files changed, 272 deletions(-) delete mode 100755 site/plugins/icon/LICENSE.txt delete mode 100755 site/plugins/icon/README.md delete mode 100644 site/plugins/icon/app/Controllers/IconController.php delete mode 100644 site/plugins/icon/bootstrap.php delete mode 100644 site/plugins/icon/composer.json delete mode 100644 site/plugins/icon/dependencies.php delete mode 100755 site/plugins/icon/gulpfile.js delete mode 100755 site/plugins/icon/lang/en_US.yaml delete mode 100755 site/plugins/icon/lang/ru_RU.yaml delete mode 100644 site/plugins/icon/package.json delete mode 100755 site/plugins/icon/plugin.yaml delete mode 100644 site/plugins/icon/settings.yaml delete mode 100644 site/plugins/icon/shortcodes/IconShortcodeExtension.php delete mode 100644 site/plugins/icon/twig/IconTwigExtension.php diff --git a/site/plugins/icon/LICENSE.txt b/site/plugins/icon/LICENSE.txt deleted file mode 100755 index f628cc1e..00000000 --- a/site/plugins/icon/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-2020 Sergey Romanenko - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/site/plugins/icon/README.md b/site/plugins/icon/README.md deleted file mode 100755 index f0fe6af3..00000000 --- a/site/plugins/icon/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Icon Plugin for [Flextype](http://flextype.org/) -![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) - -Icon Plugin for Flextype. - -## LICENSE -[The MIT License (MIT)](https://github.com/flextype/flextype/blob/master/LICENSE.txt) -Copyright (c) 2018-2020 [Sergey Romanenko](https://github.com/Awilum) diff --git a/site/plugins/icon/app/Controllers/IconController.php b/site/plugins/icon/app/Controllers/IconController.php deleted file mode 100644 index cc342bbe..00000000 --- a/site/plugins/icon/app/Controllers/IconController.php +++ /dev/null @@ -1,45 +0,0 @@ -composer install for icon plugin'); - -/** - * Register The Auto Loader - * - * Composer provides a convenient, automatically generated class loader for - * our application. We just need to utilize it! We'll simply require it - * into the script here so that we don't have to worry about manual - * loading any of our classes later on. It feels nice to relax. - * Register The Auto Loader - */ -$form_loader = require_once $form_autoload; - -/** - * Include shortcodes - */ -include_once 'shortcodes/IconShortcodeExtension.php'; - -/** - * Include dependencies - */ -include_once 'dependencies.php'; diff --git a/site/plugins/icon/composer.json b/site/plugins/icon/composer.json deleted file mode 100644 index ef52dc23..00000000 --- a/site/plugins/icon/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "flextype-plugins/icon", - "type": "project", - "description": "Icon plugin for Flextype", - "keywords": ["icon", "plugin", "flextype", "php", "html"], - "homepage": "https://github.com/flextype", - "license": "MIT", - "authors": [ - { - "name": "Sergey Romanenko", - "email": "hello@romanenko.digital", - "homepage": "http://digital.flextype.org" - } - ], - "support": { - "issues": "https://github.com/flextype/issues" - }, - "require": { - "php": ">=7.2.0" - }, - "config": { - "apcu-autoloader": true, - "optimize-autoloader": true, - "platform": { - "php": "7.2.0" - } - }, - "autoload": { - "classmap": [ - "app", - "twig" - ] - } -} diff --git a/site/plugins/icon/dependencies.php b/site/plugins/icon/dependencies.php deleted file mode 100644 index bb0adc8e..00000000 --- a/site/plugins/icon/dependencies.php +++ /dev/null @@ -1,15 +0,0 @@ -view->addExtension(new IconTwigExtension($flextype)); diff --git a/site/plugins/icon/gulpfile.js b/site/plugins/icon/gulpfile.js deleted file mode 100755 index 4c1f2aeb..00000000 --- a/site/plugins/icon/gulpfile.js +++ /dev/null @@ -1,16 +0,0 @@ -const gulp = require('gulp'); - -/** - * Task: gulp fontawesome-icons - */ -gulp.task('fontawesome-icons', function(){ - return gulp.src(['node_modules/@fortawesome/fontawesome-free/svgs/**/*']) - .pipe(gulp.dest('assets/dist/fontawesome/svgs')); -}); - -/** - * Task: gulp default - */ -gulp.task('default', gulp.series( - 'fontawesome-icons' -)); diff --git a/site/plugins/icon/lang/en_US.yaml b/site/plugins/icon/lang/en_US.yaml deleted file mode 100755 index 1ddbc65d..00000000 --- a/site/plugins/icon/lang/en_US.yaml +++ /dev/null @@ -1,2 +0,0 @@ -icon: "Icon" -icon_description: "Icon plugin for Flextype" diff --git a/site/plugins/icon/lang/ru_RU.yaml b/site/plugins/icon/lang/ru_RU.yaml deleted file mode 100755 index 1ddbc65d..00000000 --- a/site/plugins/icon/lang/ru_RU.yaml +++ /dev/null @@ -1,2 +0,0 @@ -icon: "Icon" -icon_description: "Icon plugin for Flextype" diff --git a/site/plugins/icon/package.json b/site/plugins/icon/package.json deleted file mode 100644 index 7780ca59..00000000 --- a/site/plugins/icon/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "Icon", - "version": "0.9.7", - "description": "Icon plugin for Flextype", - "homepage": "http://flextype.org", - "author": "Sergey Romanenko", - "license": "MIT", - "keywords": [ - "flextype", - "cms", - "flat cms", - "flatfile cms", - "css", - "html" - ], - "bugs": { - "url": "https://github.com/flextype/flextype/issues" - }, - "dependencies": { - "@fortawesome/fontawesome-free": "5.12.1", - "gulp": "4.0.2" - } -} diff --git a/site/plugins/icon/plugin.yaml b/site/plugins/icon/plugin.yaml deleted file mode 100755 index 1aed0c34..00000000 --- a/site/plugins/icon/plugin.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: Icon -version: 0.9.7 -description: Icon plugin for Flextype -icon: fab fa-font-awesome-flag -author: - name: Sergey Romanenko - email: hello@romanenko.digital - url: http://flextype.org -homepage: https://github.com/flextype -bugs: https://github.com/flextype/issues -license: MIT diff --git a/site/plugins/icon/settings.yaml b/site/plugins/icon/settings.yaml deleted file mode 100644 index 93f33599..00000000 --- a/site/plugins/icon/settings.yaml +++ /dev/null @@ -1,2 +0,0 @@ -# enabled: true or false to disable the plugin -enabled: true diff --git a/site/plugins/icon/shortcodes/IconShortcodeExtension.php b/site/plugins/icon/shortcodes/IconShortcodeExtension.php deleted file mode 100644 index 10af1c52..00000000 --- a/site/plugins/icon/shortcodes/IconShortcodeExtension.php +++ /dev/null @@ -1,17 +0,0 @@ -addHandler('icon', static function (ShortcodeInterface $s) { - return IconController::icon($s->getParameter('value')); -}); diff --git a/site/plugins/icon/twig/IconTwigExtension.php b/site/plugins/icon/twig/IconTwigExtension.php deleted file mode 100644 index 4ace8955..00000000 --- a/site/plugins/icon/twig/IconTwigExtension.php +++ /dev/null @@ -1,36 +0,0 @@ - ['html']]) - ]; - } - - /** - * Get Icon - */ - public function icon(string $value) : string - { - return IconController::icon($value); - } -}