Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create composer.json #11

Merged
merged 12 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/deploy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_STORE
*.bak
node_modules/
vendor
assets/js/functions.js
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `[email protected]:deworg/dewp-planet-feed.git` as an addional Github repository to your `composer.json`:
```json
"repositories": [
{
"type": "github",
"url": "[email protected]: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
Expand Down
18 changes: 18 additions & 0 deletions assets-compiler.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
29 changes: 29 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
224 changes: 224 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down