forked from joomla-extensions/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea26892
commit 2eb56ce
Showing
65 changed files
with
1,909 additions
and
3,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ EXTENSION_CDN=https://cdn.extly.com | |
|
||
RELEASE_VERSION=1.0.0 | ||
|
||
LICENSE=GNU General Public License version 3 or later; see LICENSE.txt | ||
LICENSE_CODE=GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html | ||
LICENSE=GNU General Public License version 2 or later; see LICENSE.txt | ||
LICENSE_CODE=GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html | ||
|
||
AUTHOR=Extly, CB | ||
AUTHOR=Andrea Gentil - Anibal Sanchez | ||
AUTHOR_URL=https://www.extly.com | ||
[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ To create installable the zip packages, the project must be initialized with [We | |
|
||
`npm install` | ||
|
||
### Requirements | ||
|
||
- Joomla 3.8, Joomla 4 or superior | ||
|
||
## Build task | ||
|
||
To build the extension: | ||
|
@@ -63,10 +67,10 @@ EXTENSION_CDN=https://cdn.extly.com | |
RELEASE_VERSION=1.0.0 | ||
LICENSE=GNU General Public License version 3 or later; see LICENSE.txt | ||
LICENSE_CODE=GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html | ||
LICENSE=GNU General Public License version 2 or later; see LICENSE.txt | ||
LICENSE_CODE=GNU/GPLv2 www.gnu.org/licenses/gpl-2.0.html | ||
AUTHOR=Extly, CB | ||
AUTHOR=Andrea Gentil - Anibal Sanchez | ||
AUTHOR_URL=https://www.extly.com | ||
[email protected] | ||
|
@@ -85,7 +89,25 @@ CSS_COPYRIGHT="/*!%CR% * [EXTENSION_NAME]%CR% *%CR% * @license [LICENSE_CODE]%CR | |
|
||
The Webpack builds the extensions from templates and translations, based on the .env constants. However, the first time the project is created, there is a boring task of replacing Foo in every file of the project. To simplify the task, check the `build/replace_once.sh` and `build/replace_once_folder.sh` scripts, they replace the Foo string in most of the files for you ;-). | ||
|
||
- `build/replace_once.sh`, to replace the Foo string in most of the files for you | ||
- `build/lib_*.sh`, to manage the library | ||
|
||
## Changelog | ||
|
||
### 2.0.0 | ||
|
||
- Tested on Joomla 3.8 and 4 | ||
- Joomla Codestyle review | ||
- License GPL v2 for Joomla Core compatibility | ||
- PHPUnit testing | ||
|
||
### 1.0.0 | ||
|
||
- Initial version | ||
- Support of all extension types | ||
- Webpack generator | ||
|
||
## Copyright | ||
|
||
- Copyright (c)2007-2018 Extly, CB. All rights reserved. | ||
- Distributed under the GNU General Public License version 3 or later | ||
- Copyright (c)2007-2018 Andrea Gentil - Anibal Sanchez. All rights reserved. | ||
- Distributed under the GNU General Public License version 2 or later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
#!/bin/sh | ||
|
||
LIB_FOLDER="library" | ||
VENDOR_LIB_FOLDER="library/vendor" | ||
|
||
rm -rf $VENDOR_LIB_FOLDER | ||
composer update --no-dev -d $LIB_FOLDER | ||
|
||
rm -rf $VENDOR_LIB_FOLDER/apache | ||
rm -rf $VENDOR_LIB_FOLDER/bin | ||
rm -rf $VENDOR_LIB_FOLDER/phpseclib | ||
|
||
# | ||
# Cleanup | ||
# | ||
find $VENDOR_LIB_FOLDER/ -type d -name ".git" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name ".github" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name ".vscode" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "bin" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "build" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "demo" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "doc" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "docs" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "Documentation" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "examples" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "ext" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "Fakes" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "images" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "nbproject" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "stubs" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "style" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "Test" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "test" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "Tester" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "Testing" -not -path "library/vendor/laravel/lumen-framework/src/Testing" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "tests" -exec rm -fr '{}' ';' | ||
find $VENDOR_LIB_FOLDER/ -type d -name "Tests" -exec rm -fr '{}' ';' | ||
|
||
find $VENDOR_LIB_FOLDER/ -type f -name ".editorconfig" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".gitattributes" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".gitignore" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".hhconfig" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".Mime" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".php_cs.dist" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".php_cs" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".scrutinizer.yml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".State" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".styleci.yml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name ".travis.yml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "*.sh" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "*Test.php" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "apigen.neon" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "AUTHORS" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "behat.yml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "build.php" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "build.properties" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "build.xml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "CHANGELOG.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "CHANGELOG.mdown" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "CHANGELOG" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "CHANGES" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "circle.yml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "CODE_OF_CONDUCT.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "composer.lock" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "CONTRIBUTING.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "COPYING" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "db.sql" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "docker-compose.yml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "example.php" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "FastRoute.hhi" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "gulp-config.ci.json" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "htmLawed_README*" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "htmLawed_TESTCASE.txt" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "htmLawedTest.php" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "Makefile" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "package.xml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "phpcs.xml.dist" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "phpcs.xml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "phpmd.xml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "phpunit.xml.dist" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "phpunit*.xml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "psalm.xml" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "puli.json" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "README.markdown" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "readme.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "README.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "Readme.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "README.rst" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "ReadMe.txt" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "sonar-project.properties" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "Test*" -not -path "library/vendor/laravel/lumen-framework/src/Testing*" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "UPGRADE_TO_2_1" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "UPGRADE_TO_2_2" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "Upgrade.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "UPGRADE.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "UPGRADE" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "UPGRADING.md" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "VERSION" -delete | ||
|
||
find $VENDOR_LIB_FOLDER/ -type f -name "*.xlf" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "*.twig" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "*.xsd" -delete | ||
find $VENDOR_LIB_FOLDER/ -type f -name "*.neon" -delete | ||
|
||
# find $VENDOR_LIB_FOLDER/ -type f -name "LICENCE" -delete | ||
# find $VENDOR_LIB_FOLDER/ -type f -name "LICENSE-GPL2" -delete | ||
# find $VENDOR_LIB_FOLDER/ -type f -name "LICENSE-LGPL3" -delete | ||
# find $VENDOR_LIB_FOLDER/ -type f -name "LICENSE.md" -delete | ||
# find $VENDOR_LIB_FOLDER/ -type f -name "LICENSE.txt" -delete | ||
# find $VENDOR_LIB_FOLDER/ -type f -name "LICENSE" -delete | ||
|
||
# find $VENDOR_LIB_FOLDER/ -type f -name "composer.json" -delete | ||
|
||
find $VENDOR_LIB_FOLDER/ -type d -empty -delete | ||
|
||
composer dumpautoload --optimize -d $LIB_FOLDER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
LIB_FOLDER="library" | ||
VENDOR_LIB_FOLDER="library/vendor" | ||
|
||
composer update -d $LIB_FOLDER | ||
### composer update --no-dev -d $LIB_FOLDER | ||
|
||
composer dumpautoload --optimize -d $LIB_FOLDER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ i: moduleId, | ||
/******/ l: false, | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.l = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
/******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // create a fake namespace object | ||
/******/ // mode & 1: value is a module id, require it | ||
/******/ // mode & 2: merge all properties of value into the ns | ||
/******/ // mode & 4: return value when already ns object | ||
/******/ // mode & 8|1: behave like require | ||
/******/ __webpack_require__.t = function(value, mode) { | ||
/******/ if(mode & 1) value = __webpack_require__(value); | ||
/******/ if(mode & 8) return value; | ||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | ||
/******/ var ns = Object.create(null); | ||
/******/ __webpack_require__.r(ns); | ||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | ||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | ||
/******/ return ns; | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function getDefault() { return module['default']; } : | ||
/******/ function getModuleExports() { return module; }; | ||
/******/ __webpack_require__.d(getter, 'a', getter); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ | ||
/******/ // Object.prototype.hasOwnProperty.call | ||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ (function(module, exports) { | ||
|
||
|
||
|
||
/***/ }) | ||
/******/ ]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
# A handy bash script to be execute only once on the extension-specific directories | ||
|
||
EXTENSION_NAME="XTDir for Algolia" | ||
EXTENSION_NAME="XT Search for Algolia" | ||
EXTENSION_ALIAS="xtdir4alg" | ||
EXTENSION_CLASS_NAME="Xtdir4alg" | ||
TRANSLATION_KEY="XTDIR4ALG" | ||
|
@@ -33,8 +33,8 @@ find $1 -name "*foo*" -type d -exec rename "s/foo/$EXTENSION_ALIAS/" {} \; | |
find $1 -name "*foo*" -type f -exec rename "s/foo/$EXTENSION_ALIAS/" {} \; | ||
|
||
|
||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[AUTHOR\]/Andrea Gentil - Anibal Sanchez/g" {} \; | ||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[AUTHOR\]/Extly, CB/g" {} \; | ||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[AUTHOR_EMAIL\]/[email protected]/g" {} \; | ||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[COPYRIGHT\]/Copyright (c)2018 Andrea Gentil - Anibal Sanchez All rights reserved./g" {} \; | ||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[COPYRIGHT\]/Copyright (c)2007-2018 Extly, CB All rights reserved./g" {} \; | ||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[LICENSE\]/GNU General Public License version 3 or later; see LICENSE.txt/g" {} \; | ||
find $1 -type f -not -name "*.sh" -exec sed -i "s/\[AUTHOR_URL\]/https\:\/\/www\.extly\.com/g" {} \; |
Oops, something went wrong.