From 54dbc4e9f95ea6fd2c73cada61f19b64d4d66342 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Thu, 15 Apr 2021 16:56:45 +0100 Subject: [PATCH] fix: checked out wrong versions --- README.md | 214 +++++++++++++++++++++++++------------------------- composer.lock | 131 +++++++++++++++++++++++++++++- 2 files changed, 237 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 3110070..ce1ae13 100644 --- a/README.md +++ b/README.md @@ -2,139 +2,139 @@ # footnotes -## Description +Featured on [wpmudev][wpmudev] — cheers for the review, folks! -Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! +**footnotes** aims to be the all-in-one solution for displaying an +automatically-generated list of references on your Page or Post. The Plugin +ships with a set of defaults while also empowering you to control how your +footnotes will be displayed. -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your +WordPress Pages and Posts — those footnotes we know from offline publishing. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. +## Table of Contents + +* [Features](#features) +* [Getting Started](#getting-started) +* [Deploying](#deploying) +* [Testing](#testing) +* [Code Formatting](#code-formatting) +* [Documentation](#documentation) +* [Acknowledgments](#acknowledgements) +* [License](#license) +* [Contact Information](#contact-information) + +## Features + +This Plugin provides: + +- fully customizable footnote start and end shortcodes; +- stylable tooltips supporting hyperlinks and dedicated text; +- a responsive 'reference container', with customisable positioning; +- a wide choice of different numbering styles; +- a freely-configurable and optional backlink symbol; +- footnote appearance customisation via dashboard settings and custom CSS style + rules; and +- editor buttons for easily adding shortcode tags. ## Getting Started -1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) - - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment -1. Install [Composer](https://getcomposer.org/download/), if you don't have it already -1. Install dependencies (`composer install`) -1. Create a new branch from `main` (`git checkout -b `) -1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/markcheret/footnotes/pulls). +1. Read the [contributing guidelines][contributing]; +1. clone this repository (`git clone git@github.com:markcheret/footnotes.git`): + - we recommend that you use [VVV][vvv] for your local testing environment. +1. install [Composer][composer], if you don't have it already; and +1. install all dependencies (`composer install`): + - you will have to install `php-mbstring` manually if you do not already + have it. + +## Deploying -## Checking WP Coding Standard Compliance +Automated release deployments will be introduced soon. -1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) -1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` - - You may have to enable double-wildcards in your console first (`shopt -s globstar`) +### Building -## Building - -1. Run `_tools/build-stylesheets.sh -c` to concatenate stylesheets -1. Manually minify the output files in `css/tmp/`, saving them as `.min.css` files - - The intention is to replace this with automated minification, meaning that +1. Run `_tools/build-stylesheets.sh -c` to concatenate stylesheets; +1. manually minify the output files in `css/tmp/`, saving them as `.min.css` files: + - the intention is to replace this with automated minification, meaning that all of these steps can be rolled into a single `build` command. -1. Run `_tools/build-stylesheets.sh -d` to deploy the minified files to `dist/` - - **this will delete any existing `dist/` folder** -1. Run `composer run build` to move over the remaining files to `dist/` - - Currently, the files to include in a distribution are hard-coded in `_tools/build.sh` - - The intention is to replace this with a proper parsing of the `.distignore` file - -## Updating Documentation - -1. Install [phpDocumentor](https://phpdoc.org/) -1. Run it (`phpDocumentor -d . -t docs`) +1. run `_tools/build-stylesheets.sh -d` to deploy the minified files to `dist/`: + - **this will delete any existing `dist/` folder!** +1. run `composer run build` to move over the remaining files to `dist/`: + - currently, the files to include in a distribution are hard-coded in + `_tools/build.sh`; but + - the intention is to replace this with a proper parsing of the `.distignore` + file + +### Releasing +1. Ensure that you have configured your Git config. with SVN credentials; +1. run the above [build](#building) commands; and +1. run `composer run release` and follow the prompts. + ## Testing -Unit tests are TODO. +Automated testing will be introduced soon. -## Getting Started +## Code Formatting -1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) -1. Install [Composer](https://getcomposer.org/download/), if you don't have it already -1. Install dependencies (`composer install`) -1. Create a new branch from `main` (`git checkout -b `) -1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). +This repo. uses pre-commit code formatting and linting on all staged files. +This ensures that only style-conformant code can be committed. -## Updating Documentation +The individual commands used by the pre-commit hook can also be called manually: -1. Install [phpDocumentor](https://phpdoc.org/) -1. Run it (`phpDocumentor -d . -t docs`) +### PHP Code -## Getting Started +PHP code must follow the [WordPress PHP Coding Standards][wpcs-php]. -1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) -1. Install [Composer](https://getcomposer.org/download/), if you don't have it already -1. Install dependencies (`composer install`) -1. Create a new branch from `main` (`git checkout -b `) -1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). +1. Run `composer run lint:php` to lint all JS/TS files with [PHP CodeSniffer][phpcs] +1. Run `composer run lint:php:fix` to attempt to automatically fix warnings and + errors with the PHP Code Beautifier and Formatter. + +### JavaScript Code -## Updating Documentation +JavaScript code must follow the [WordPress JavaScript Coding Standards][wpcs-js]. -1. Install [phpDocumentor](https://phpdoc.org/) -1. Run it (`phpDocumentor -d . -t docs`) +Automated linting and formatting will be introduced soon. + +### CSS Stylesheets -## Getting Started +JavaScript code must follow the [WordPress CSS Coding Standards][wpcs-css]. -1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) -1. Install [Composer](https://getcomposer.org/download/), if you don't have it already -1. Install dependencies (`composer install`) -1. Create a new branch from `main` (`git checkout -b `) -1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). +Automated linting and formatting will be introduced soon. -## Updating Documentation +## Documentation -1. Install [phpDocumentor](https://phpdoc.org/) -1. Run it (`phpDocumentor -d . -t docs`) +Run `composer run docs` to automatically generate HTML documentation with +[phpDocumentor][phpdocumentor]. -## Getting Started - -1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) -1. Install [Composer](https://getcomposer.org/download/), if you don't have it already -1. Install dependencies (`composer install`) -1. Create a new branch from `main` (`git checkout -b `) -1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). - -## Updating Documentation - -1. Install [phpDocumentor](https://phpdoc.org/) -1. Run it (`phpDocumentor -d . -t docs`) - -## Main Features - -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; -- Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; -- Wide choice of numbering styles; -- Freely configurable and optional backlink symbol; -- Configure the **footnotes'** appearance by dashboard settings and Custom CSS style rules; -- Button in both the Visual and the Text editor to add shortcodes around selection. - -## Example Usage - -These are a few examples of possible ways to delimit footnotes: - -1. Your awesome text((with an awesome footnote)) -2. Your awesome text[ref]with an awesome footnote[/ref] -3. Your awesome text``with an awesome footnote`` -4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` - -## Where to get footnotes? - -The current version is available on the [WordPress.org Plugin Directory](https://wordpress.org/plugins/footnotes/). +View the current docs [here][footnotes-docs]. ## Acknowledgements -Huge thanks to every **footnotes user**, contributor, bug reporter, feature requester and fan! +Huge thanks to every **footnotes user**, contributor, bug reporter, feature +requester and fan! + +## License + +This project is licensed under the [GNU GPL v3][gpl-v3]. + +## Contact Information + +| Name | Link(s) | +|---------------|-----------------------| +|Mark Cheret | [Email][mcheret] | + +[wpmudev]: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ +[php]: https://www.php.net/ +[contributing]: https://github.com/markcheret/footnotes/blob/main/CONTRIBUTING.md +[vvv]: https://varyingvagrantvagrants.org/ +[composer]: https://getcomposer.org/download/ +[wpcs-php]: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/ +[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer +[wpcs-js]: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/ +[wpcs-css]: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/ +[phpdocumentor]: https://phpdoc.org/ +[footnotes-docs]: https://markcheret.github.io/footnotes/ +[gpl-v3]: https://www.gnu.org/licenses/gpl-3.0.en.html +[mcheret]: mailto:mark@cheret.de + diff --git a/composer.lock b/composer.lock index 495ddf0..fc795b3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "96b80176526406b01227fcaef2a4c2fc", + "content-hash": "c15a58a62ba5d8b2d7f3273717a8381a", "packages": [], "packages-dev": [ { @@ -80,6 +80,61 @@ ], "time": "2020-11-11T10:22:58+00:00" }, + { + "name": "damianopetrungaro/php-commitizen", + "version": "v0.2.0", + "source": { + "type": "git", + "url": "https://github.com/conventional-commits/php-commitizen.git", + "reference": "985283538f013c37146b2ec83812eeef2ff9d73c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/conventional-commits/php-commitizen/zipball/985283538f013c37146b2ec83812eeef2ff9d73c", + "reference": "985283538f013c37146b2ec83812eeef2ff9d73c", + "shasum": "" + }, + "require": { + "symfony/console": "^4 || ^5" + }, + "require-dev": { + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9" + }, + "bin": [ + "php-commitizen" + ], + "type": "library", + "autoload": { + "psr-4": { + "Damianopetrungaro\\PHPCommitizen\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Damiano Petrungaro", + "email": "damianopetrungaro@gmail.com" + } + ], + "description": "Help writing Git commit following conventional commit specs", + "keywords": [ + "atomic", + "atomic commit", + "commit", + "conventional commit", + "conventionalcommit", + "git" + ], + "support": { + "issues": "https://github.com/conventional-commits/php-commitizen/issues", + "source": "https://github.com/conventional-commits/php-commitizen/tree/v0.2.0" + }, + "time": "2020-07-15T23:51:42+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.1", @@ -1343,6 +1398,79 @@ ], "time": "2020-10-31T13:45:51+00:00" }, + { + "name": "marcocesarato/php-conventional-changelog", + "version": "v1.9.10", + "source": { + "type": "git", + "url": "https://github.com/marcocesarato/php-conventional-changelog.git", + "reference": "ecf53957bd84126f024f261c4b2fef4a889aafd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/marcocesarato/php-conventional-changelog/zipball/ecf53957bd84126f024f261c4b2fef4a889aafd2", + "reference": "ecf53957bd84126f024f261c4b2fef4a889aafd2", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/console": "^4 || ^5" + }, + "require-dev": { + "brainmaestro/composer-git-hooks": "^2.8", + "friendsofphp/php-cs-fixer": "^2.18" + }, + "bin": [ + "conventional-changelog" + ], + "type": "library", + "extra": { + "hooks": { + "pre-commit": "composer fix-cs", + "pre-push": "composer check-cs", + "post-merge": "composer install" + } + }, + "autoload": { + "psr-4": { + "ConventionalChangelog\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "Marco Cesarato", + "email": "cesarato.developer@gmail.com" + } + ], + "description": "Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org", + "keywords": [ + "changelog", + "commit", + "commits", + "convention", + "conventional", + "conventional-changelog", + "conventional-changelog-preset", + "conventional-commit", + "conventional-commits", + "conventionalcommits", + "generation", + "git", + "history", + "php", + "readme", + "tag" + ], + "support": { + "issues": "https://github.com/marcocesarato/php-conventional-changelog/issues", + "source": "https://github.com/marcocesarato/php-conventional-changelog/tree/v1.9.10" + }, + "time": "2021-04-13T19:48:52+00:00" + }, { "name": "monolog/monolog", "version": "2.2.0", @@ -5109,3 +5237,4 @@ "platform-dev": [], "plugin-api-version": "2.0.0" } +