From 2b86e3fdaf735588d23709ddcdb89b093f6396dd Mon Sep 17 00:00:00 2001 From: Ben Woodward Date: Thu, 15 Jul 2021 09:01:18 -0700 Subject: Add make targets for prettier formatting (#50) --- Makefile | 8 ++++++++ README.md | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3ac82a2..28b8537 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,14 @@ dev: yarn yarn start +.PHONY: fmt +fmt: + npx prettier --check . '!**/*.min.{css,js}' + +.PHONY: fmt.write +fmt.write: + npx prettier --write . '!**/*.min.{css,js}' + .PHONY: run run: docker run --rm -p 8080:80 $(TAG_LATEST) diff --git a/README.md b/README.md index 5d4fe19..5b8fc3d 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,14 @@ make run This project uses [Prettier](https://prettier.io/) formatting and all pull requests must pass the automated lint checks prior to merging. -Run the link check with: +Run the lint check with: ``` -npx prettier --check . '!**/*.min.{css,js}' +make fmt ``` Rewrite the files to resolve any style issues with: ``` -npx prettier --write . '!**/*.min.{css,js}' +make fmt.write ``` -- cgit v1.2.3