Skip to content

Commit

Permalink
Merge pull request #45 from hypothesis/add-makefile
Browse files Browse the repository at this point in the history
Add a basic Makefile
  • Loading branch information
acelaya authored Jan 26, 2024
2 parents 266d456 + e4fab59 commit 7e2dd8b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.PHONY: default
default: help

.PHONY: help
help:
@echo "make help Show this help message"
@echo "make dev Run the plugin in the development WordPress"
@echo "make lint Run the code linter(s) and print any warnings"
@echo "make format Automatically format code"
@echo "make sure Make sure that the formatter, linter, tests, etc all pass"

.PHONY: dev
dev: vendor
docker compose up

.PHONY: lint
lint: vendor
composer lint

.PHONY: format
format: vendor
composer format

.PHONY: sure
sure: lint

vendor: composer.json composer.lock
composer install
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Stable versions are available on the [Hypothesis plugin page on WordPress.org](https://wordpress.org/plugins/hypothesis/).

## Install Directions
## Install this plugin

1. Visit your WordPress plugins page (/wp-admin/plugins.php)
2. Click the Add New button
Expand All @@ -11,6 +11,13 @@ Stable versions are available on the [Hypothesis plugin page on WordPress.org](h
5. Click Activate
6. Visit your WordPress Settings > Hypothesis page to configure how it works on your site

## Development

1. Install `php` and the `dom` and `mbstring` extensions.
2. [Download Composer](https://getcomposer.org/download/), the PHP package manager.
3. Run `make dev`. This will start a local WordPress instance with this plugin mounted on it.
4. Access http://localhost:8080 (the first time you'll have to finish setting up WordPress by following presented instructions)

## Publishing

Follow these steps to publish a new plugin version.
Expand Down

0 comments on commit 7e2dd8b

Please sign in to comment.