Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Refactor: install by zip or submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
omz13 committed Feb 17, 2019
1 parent 3de5915 commit e4bb384
Show file tree
Hide file tree
Showing 41 changed files with 3,170 additions and 989 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.idea export-ignore
/dist export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.rmt.yml export-ignore
.sgc export-ignore
makefile export-ignore
phpcs.xml export-ignore
phpstan.neon export-ignore
RMT export-ignore
45 changes: 43 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@
.DS_Store
kirby
vendor
/kirby
/vendor/bin
/vendor/**/.*
/vendor/**/*.json
/vendor/**/*.txt
/vendor/**/*.md
/vendor/**/*.yml
/vendor/**/*.yaml
/vendor/**/*.xml
/vendor/**/*.dist
/vendor/**/readme.php
/vendor/**/LICENSE
/vendor/**/COPYING
/vendor/**/VERSION
/vendor/**/docs/*
/vendor/**/example/*
/vendor/**/examples/*
/vendor/**/test/*
/vendor/**/tests/*
/vendor/**/php4/*
/vendor/getkirby/composer-installer
*.zip
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/**/contentModel.xml
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
.idea/**/gradle.xml
.idea/**/libraries
.idea/modules.xml
.idea/*.iml
.idea/modules
cmake-build-*/
.idea/**/mongoSettings.xml
*.iws
.idea/httpRequests
4 changes: 2 additions & 2 deletions .rmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _default:
# - relative/path/to/your-own-sript.php
prerequisites:
- command:
cmd: composer sanity
cmd: make prerelease
live_output: false
- working-copy-check
- display-last-changes
Expand Down Expand Up @@ -44,5 +44,5 @@ master:
dump-commits: true
exclude-merge-commits: true
command: # because version number updated in composer.json, force update so composer.lock also updated
cmd: composer update
cmd: composer update --no-dev
vcs-commit: ~ # Commit the changes
26 changes: 5 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,13 @@ The non-binding list of planned features and implementation notes are:

### Installation

#### via composer
Pick one of the following per your epistemological model:

If your kirby3-based site is managed using-composer, simply invoke `composer require --no-dev omz13/kirby3-feeds`, or add `omz13/kirby3-feeds` to the "require" component of your site's `composer.json` as necessary, e.g. to be on the bleeding-edge:
- `composer require --no-dev omz13/kirby3-feeds`; the plugin will automagically appear in `site/plugins`.
- Download a zip of the latest release - [master.zip](https://github.com/omz13/kirby3-feeds/archive/master.zip) - and copy the contents to your `site/plugins/kirby3-feeds`.
- `git submodule add https://github.com/omz13/kirby3-feeds.git site/plugins/kirby3-feeds`.

```yaml
"require": {
...
"omz13/kirby3-feeds": "@dev",
...
}
```

#### via git

Clone github.com/omz13/kirby3-feeds into your `site/plugins` and then in `site/plugins/kirby3-feeds` invoke ``composer update --no-dev`` to generate the `vendor` folder and the magic within.

```sh
$ git clone github.com/omz13/kirby3-feeds site/plugins/kirby3-feeds
$ cd site/plugins/kirby3-feeds
$ composer update --no-dev
```

If your project itself is under git, then you need to add the plugin as a submodule and possibly automate the composer update; it is assumed if you are doing this that you know what to do.
For the record: installation by composer is cool; supporting installation by zip and submodule was an absolute pain, especially as I am an installation by composer person, so do feel guilted into getting me Coffee, Beer, etc., because this is for _your_ benefit and _not mine_ (and yes, I would have have preferred to spend my time somewhere warm and sunny instead of being hunched over a keyboard while the snow falls outside and the thermometer shows no inclination to get above 0C).

### Configuration

Expand Down
3 changes: 2 additions & 1 deletion RMT
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env php
<?php
include 'vendor/autoload.php';
define('RMT_ROOT_DIR', __DIR__);
require 'vendor/liip/rmt/command.php';
require getenv('HOME') . '/.composer/vendor/liip/rmt/command.php';
38 changes: 6 additions & 32 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "omz13/kirby3-feeds",
"type": "kirby-plugin",
"description": "kirby3 plugin to generate syndication feeds (atom, json, rss) from collections",
"keywords": [
"kirby3",
"plugin",
"sitemap"
],
"version": "1.0.0",
"license": "proprietary",
"license": "BSD-3-Clause",
"authors": [
{
"name": "David Somers",
Expand All @@ -18,13 +19,13 @@
],
"require": {
"php": ">=7.1",
"getkirby/cms": "^3.0.0-RC-2.0",
"getkirby/composer-installer": "^1.1",
"league/html-to-markdown": "^4.8"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"getkirby/cms": "^3.0.1",
"jakub-onderka/php-parallel-lint": "^1.0",
"liip/rmt": "^1.4",
"localheinz/composer-normalize": "^0.8.0",
"omz13/omz13-coding-standard": "dev-master",
"phpcompatibility/php-compatibility": "^8.2",
Expand All @@ -40,26 +41,7 @@
"autoload": {
"psr-4": {
"omz13\\": "src/"
},
"files": [
"src/config.php"
]
},
"archive": {
"exclude": [
".*",
"makefile",
"kirby",
"*.xml",
"!/vendor/*",
"/vendor/*/*/.*",
"/vendor/*/*/docs/*",
"/vendor/*/*/example/*",
"/vendor/*/*/examples/*",
"/vendor/*/*/test/*",
"/vendor/*/*/tests/*",
"/vendor/*/*/php4/*"
]
}
},
"minimum-stability": "beta",
"scripts": {
Expand All @@ -81,14 +63,6 @@
"@mess"
],
"stan": "./vendor/bin/phpstan analyse --level 7 ./src",
"style": "./vendor/bin/phpcs ./src/*",
"zip": [
"composer remove getkirby/cms",
"composer install --no-dev",
"composer dumpautoload -o",
"composer archive --format=zip --dir=dist",
"composer require getkirby/cms:'^3.0.0-RC-2.0'",
"composer dumpautoload -o"
]
"style": "./vendor/bin/phpcs ./src/*"
}
}
Loading

0 comments on commit e4bb384

Please sign in to comment.