diff --git a/.github/workflows/deploy-workflow.yml b/.github/workflows/deploy-workflow.yml index 8160196..55cbed8 100644 --- a/.github/workflows/deploy-workflow.yml +++ b/.github/workflows/deploy-workflow.yml @@ -29,6 +29,9 @@ jobs: mkdir -p dewp-planet-feed rsync -rav --exclude-from='.rsync-exclude' --delete-excluded ./ dewp-planet-feed zip -r dewp-planet-feed.zip dewp-planet-feed/ + cd dewp-planet-feed/assets + zip -r ../../assets.zip ./* + cd ../.. rm -rf dewp-planet-feed - name: Get Release id: get_release @@ -40,3 +43,10 @@ jobs: asset_path: ./dewp-planet-feed.zip asset_name: dewp-planet-feed.zip asset_content_type: application/zip + - name: Upload assets ZIP to release. + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: ./assets.zip + asset_name: assets.zip + asset_content_type: application/zip diff --git a/.gitignore b/.gitignore index 71f5204..52b647a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_STORE *.bak node_modules/ +vendor assets/js/functions.js \ No newline at end of file diff --git a/README.md b/README.md index 22093aa..81bf433 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,53 @@ * License: GPLv3 * License URI: http://www.gnu.org/licenses/gpl-3.0.html -## Description ## +## Description Generates a custom feed `dewp-planet` for posts. Adds a checkbox to the _Publish_ meta box in order to explicitly add a post to that custom feed. ![Screenshot (GIF)](https://github.com/deworg/dewp-planet-feed/blob/master/screenshot.gif?raw=true) --- +## Installation +### Via SFTP or backend +1. Download the asset `dewp-planet-feed.zip` from the [latest release](https://github.com/deworg/dewp-planet-feed/releases/latest). +1. Upload the folder `dewp-planet-feed` to the `/wp-content/plugins/` directory, or directly upload the ZIP through the »Plugins« › »Add new« › »Upload plugin« screen in the WordPress backend. +1. Activate the plugin through the »Plugins« menu in WordPress. + +### With Composer +If you would like to pull the plugin with Composer (e.g. with [Bedrock](https://roots.io/bedrock/)) you have to compile the JavaScript assets yourself or use the [Composer Asset Compiler](https://github.com/inpsyde/composer-asset-compiler). This plugin is compatible and even provides the pre-compiled assets for each release. + +To pull this Plugin with Composer, follow these steps: + +1. Add `git@github.com:deworg/dewp-planet-feed.git` as an addional Github repository to your `composer.json`: +```json + "repositories": [ + { + "type": "github", + "url": "git@github.com:deworg/dewp-planet-feed.git" + } + ], +``` +2. Require the plugin +```bash +$ composer require deworg/dewp-planet-feed +``` +3. Compile the assets with `npm install && npm run build:production` in the plugin directory or setup the [Composer Asset Compiler](https://github.com/inpsyde/composer-asset-compiler) with: +```bash +$ composer require inpsyde/composer-assets-compiler +``` +4. If you choose the Composer Asset Compiler, run `composer compile-assets` after every plugin update time or activate auto run in your `composer.json`: +```json + "extra": { + "composer-asset-compiler": { + "auto-run": true, + } + } +``` +5. Done. If you choose auto run, try it with `composer update` or `composer install` + +--- + ## Changelog ### 0.5.1 – 28.10.2018 diff --git a/assets-compiler.json b/assets-compiler.json new file mode 100644 index 0000000..a9c743b --- /dev/null +++ b/assets-compiler.json @@ -0,0 +1,18 @@ +{ + "script": "build:production", + "pre-compiled": { + "env": { + "root": { + "adapter": false + }, + "$default": { + "source": "assets", + "target": "./assets/", + "adapter": "gh-release-zip", + "config": { + "repository": "deworg/dewp-planet-feed" + } + } + } + } +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..e9b8167 --- /dev/null +++ b/composer.json @@ -0,0 +1,29 @@ +{ + "name": "deworg/dewp-planet-feed", + "description": "WordPress Plugin: DEWP Planet Feed", + "type": "wordpress-plugin", + "authors": [ + { + "name": "Florian Brinkmann" + }, + { + "name": "Caspar Hübinger" + }, + { + "name": "Dominik Schilling" + }, + { + "name": "Torsten Landsiedel" + } + ], + "require": { + "composer/installers": "^1.0", + "inpsyde/composer-assets-compiler": "^2.0" + }, + "extra": { + "composer-asset-compiler": { + "dependencies": "install", + "script": "build:production" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..c42717c --- /dev/null +++ b/composer.lock @@ -0,0 +1,224 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "f2503ce0f2b65d466dad41d13ae924fb", + "packages": [ + { + "name": "composer/installers", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "replace": { + "roundcube/plugin-installer": "*", + "shama/baton": "*" + }, + "require-dev": { + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.3" + }, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Craft", + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Starbug", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "aimeos", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "joomla", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "mediawiki", + "modulework", + "modx", + "moodle", + "osclass", + "phpbb", + "piwik", + "ppi", + "processwire", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "symfony", + "typo3", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v1.10.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-01-14T11:07:16+00:00" + }, + { + "name": "inpsyde/composer-assets-compiler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/inpsyde/composer-asset-compiler.git", + "reference": "11de914f4a003f74d7d522f12947356c893f460e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/inpsyde/composer-asset-compiler/zipball/11de914f4a003f74d7d522f12947356c893f460e", + "reference": "11de914f4a003f74d7d522f12947356c893f460e", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1 || ^2", + "ext-json": "*", + "php": ">= 7.2" + }, + "require-dev": { + "composer/composer": "^2", + "inpsyde/php-coding-standards": "^1@dev", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1", + "phpunit/phpunit": "^8", + "vimeo/psalm": "^3" + }, + "type": "composer-plugin", + "extra": { + "class": "Inpsyde\\AssetsCompiler\\Composer\\Plugin" + }, + "autoload": { + "psr-4": { + "Inpsyde\\AssetsCompiler\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Inpsyde GmbH", + "role": "company" + }, + { + "name": "Giuseppe Mazzapica", + "email": "g.mazzapica@inpsyde.com" + } + ], + "description": "Composer plugin that installs and compile frontend dependencies for installed Composer packages based on configuration.", + "support": { + "issues": "https://github.com/inpsyde/composer-asset-compiler/issues", + "source": "https://github.com/inpsyde/composer-asset-compiler/tree/2.0.1" + }, + "time": "2020-12-02T17:52:14+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/package.json b/package.json index 890bcd2..01e3ecc 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "type": "git", "url": "git+https://github.com/deworg/dewp-planet-feed.git" }, - "author": "Florian Brinkmann, Caspar Hübinger, Dominik Schilling", + "author": "Florian Brinkmann, Caspar Hübinger, Dominik Schilling, Torsten Landsiedel", "license": "GPL-3.0-or-later", "bugs": { "url": "https://github.com/deworg/dewp-planet-feed/issues"