Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbestle committed Sep 5, 2022
0 parents commit ebcb762
Show file tree
Hide file tree
Showing 64 changed files with 8,997 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
coverage:
status:
default_rules:
# don't send status checks that don't have flag coverage uploaded
flag_coverage_not_uploaded_behavior: exclude

# rules for overall project-wide coverage
project:
backend:
flags:
- backend
target: auto
threshold: 1%
frontend:
flags:
- frontend
target: auto
informational: true # don't fail because of frontend tests for now

# rules based on the specific changes of the PR
patch:
backend:
flags:
- backend
target: 100%
threshold: 2%
frontend:
flags:
- frontend
target: auto
informational: true # don't fail because of frontend tests for now

flags:
backend:
paths:
- src/classes/
frontend:
paths:
- src/frontend/
17 changes: 17 additions & 0 deletions .composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"symbol-whitelist": [],
"php-core-extensions": [
"Core",
"date",
"json",
"pcre",
"Phar",
"Reflection",
"SPL",
"standard"
],
"scan-files": [
"src/**/*.php",
"index.php"
]
}
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true

[*.php]
indent_size = 4
insert_final_newline = true

[*.yml]
indent_style = space

[*.md,*.txt]
trim_trailing_whitespace = false
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:vue/recommended",
"prettier"
],
globals: {
"panel": true
},
rules: {
"vue/attributes-order": "error",
"vue/component-definition-name-casing": "off",
"vue/html-closing-bracket-newline": [
"error",
{
singleline: "never",
multiline: "always"
}
],
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/require-prop-types": "error"
}
};
30 changes: 30 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Git
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore

# Source files
src/frontend/ export-ignore

# Development files
.editorconfig export-ignore
.eslintrc.js export-ignore
.prettierrc.json export-ignore
composer.lock export-ignore
package-lock.json export-ignore
package.json export-ignore
rollup.config.js export-ignore

# Screenshots
screenshot.png export-ignore

# Tests
.codecov.yml export-ignore
.composer-require-checker.json export-ignore
.php-cs-fixer.dist.php export-ignore
phpmd.xml.dist export-ignore
phpunit.xml.dist export-ignore
psalm.xml.dist export-ignore
etc/ export-ignore
stubs/ export-ignore
tests/ export-ignore
75 changes: 75 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Contributing to the Roomle plugin

👍️🎉 First off, thanks for taking the time to contribute! 🎉👍️

There are a few ways how you can contribute to the development of the Roomle plugin:

## Report issues & suggest features

While the Roomle plugin was originally created for a client project, the goal is to make it useful for other projects as well. For that I need to know if something isn't working or if something can be improved.

It's already a huge help to receive detailed bug reports and thought-through feature requests. You can submit any of these by [creating a new issue](https://github.com/lukasbestle/kirby-roomle/issues/new) and using the issue templates, which are set up to guide you through providing all information. The more relevant information you give, the easier it is to find a solution for the bug or feature/enhancement request.

## Help with translations

The Panel interface of the Roomle plugin uses the configured user language for all the displayed text. Of course I don't speak all languages of the world, so I need your help.

You can contribute additional translations by forking this repo and editing the following files:

- Most importantly, add the translation to the block blueprint in [`src/config/blueprints/blocks/roomle-configurator.yml`](https://github.com/lukasbestle/kirby-roomle/blob/main/src/config/blueprints/blocks/roomle-configurator.yml).
- Add a new file in the [`src/config/i18n` directory](https://github.com/lukasbestle/kirby-roomle/tree/main/src/config/i18n). You can copy any of the existing translation files and use them as the base (however the English translation in `en.php` is considered the "original" and complete version).
- Please also add your translation to the list in [`src/config/translations.php`](https://github.com/lukasbestle/kirby-roomle/blob/main/src/config/translations.php).

Once you are ready, send a pull request to this repo.

If you want to improve existing translations, you can change the blueprint and translation files directly and send a pull request.

Thank you for your help! ❤️

## Code contributions

Pull requests for bug fixes or enhancements are always welcome!

Please note that I can't guarantee that your pull request will be merged, especially if it's for a larger feature. If you want to make sure, please create an issue first (or comment in an existing issue, if one already exists for the task you want to work on) to discuss your idea.

### How to set up the project for local development

If you want to contribute, please first fork this repo.

Now set up a local installation of one of the Kirby kits (I recommend the [Starterkit](https://github.com/getkirby/starterkit) or [Demokit](https://github.com/getkirby/demokit)). Create the directory `/site/plugins` if it doesn't already exist and then clone your fork of the Roomle plugin into `/site/plugins/roomle`.

If you want to work on Panel code, please run the following commands inside `/site/plugins/roomle`:

```sh
npm install
npm run dev
```

This will run the kirbyup bundler, which will listen for changes to the files inside the `src/frontend` directory. You can now open the Panel of your Kirby installation.

If you want to work on the frontend code for the block, please run the following commands:

```sh
npm install
npm run build:public
```

If you want to work on backend code and want to run the automated tests, you need the following command:

```sh
composer install
```

The tests assume that you have PHPUnit installed globally. I also use a few other analysis tools that each have their commands listed in `/composer.json`. With `composer ci` you can run all tools at once (which assumes that all tools have been installed globally). If you don't want to install tools, don't worry – all tools will also be run automatically once you create your pull request.

**Note:** Never commit the changes to the compiled dist files `/index.css`, `/index.js` and `/assets/*`. Including these files in your PR will lead to merge conflicts down the road. Instead, I will build the dist files for each plugin release.

## Monetary support

Most of my development time for this plugin has already been paid for, which is why I'm offering the plugin for free under the terms of the MIT license. For the same reason I do not sell licenses or accept donations.

However you can support my work by commissioning the development of a feature of your choice: If your project requires a specific feature, you can pay me to build it for you. In exchange for your support you will get the feature more quickly and it will be designed with your requirements in mind. Additionally I can mention you as the sponsor of the feature in the Credits section of the plugin's `README`.

Features developed in this way will also be published to this repo so that the community can benefit from them as well. This approach also enables future improvements and fixes to the feature.

If you are interested, please get in touch directly via the [Kirby Forum](https://forum.getkirby.com/u/lukasbestle), [Discord](https://chat.getkirby.com) or [email](mailto:project-kirbyroomle@codesignd.de) to discuss the details.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "🐛 Bug report"
about: "Something that isn't working as expected 🤬"
labels: "type: bug 🐛"
---

## Describe the bug
<!-- A clear and concise description of what the bug is. -->

## Steps to reproduce
<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error -->

## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->

## Additional context
<!-- E.g. screenshots -->

## Technical details

- Plugin version:
- Kirby version:
- Browser:
- Server operating system:
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "✨ Enhancement"
about: "It exists in the Roomle plugin, but you think it should be better 🤓"
labels: "type: enhancement ✨"
---

## Which aspect in the Roomle plugin bothers you and why?


## How would you improve it?


## How would this make the Roomle plugin better?
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "⭐️ Feature request"
about: "Something you would like to see added 🤩"
labels: "type: feature ⭐️"
---

## Is your feature request related to a problem? Please describe.
<!-- Describe what the problem is. E.g "I'm always frustrated when [...]" -->

## Solution you'd like
<!-- Describe what you want to happen. -->

## Potential alternatives
<!-- Describe alternative solutions or features, if you've considered any. -->

## Additional context
<!-- Add any other context or screenshots about the feature request here. -->
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Describe the PR
<!-- A clear and concise description of the bug the PR fixes or the feature the PR introduces. I may use this for the changelog and/or documentation. -->

## Related issues
<!-- PR relates to issues in this repo or to discussions in the forum: -->

- Fixes #

## Ready?
<!-- If you feel like you can help to check off the following tasks, that'd be great. If not, don't worry - I will take care of it. -->

- [ ] Added unit tests for fixed bug/feature
- [ ] Added in-code documentation (if needed)
- [ ] CI passes (runs automatically when the PR is created or run `composer ci` locally)
Running locally requires PHPUnit, PHP-CS-Fixer, Psalm, PHPCPD and PHPMD.
14 changes: 14 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Security Policy

I take the security of my open-source projects seriously. If you believe you found a security vulnerability, please report it to me as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please send me an email to <project-kirbyroomle@lukasbestle.com>.

If you want to encrypt your message, you can use my PGP key:
[`D703 9FD2 4AAE 69E9 97A6 92FF 2E2A DD32 FE50 61C1`](https://lukasbestle.com/pgp.asc)

I will get back to you as soon as possible. Please give me some time to fix the issue before publishing your findings (Coordinated Vulnerability Disclosure).
Loading

0 comments on commit ebcb762

Please sign in to comment.