From c68d2d4426544b789839713d0bb4130dcf7bed23 Mon Sep 17 00:00:00 2001 From: Joseph Spurrier Date: Wed, 3 Jun 2020 00:28:11 -0400 Subject: [PATCH] Fix typo and add more commands to Makefile --- Makefile | 17 +++++++++++++++++ docs/docs/database.md | 2 +- src/app/ui/webpack.config.babel.js | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ee14e969..56b27225 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,23 @@ ui-test: # Run the Jest UI tests. cd ${GOPATH}/src/app/ui && npm test +.PHONY: eslint +eslint: + # Run ESLint on the UI script folder. + cd ${GOPATH}/src/app/ui && eslint script + +# Save the ARGS. +# https://stackoverflow.com/a/14061796 +ifeq (npm,$(firstword $(MAKECMDGOALS))) + ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) + $(eval $(ARGS):;@:) +endif + +.PHONY: npm +npm: + # Run the NPM commands from the UI folder. + cd ${GOPATH}/src/app/ui && npm run $(ARGS) + .PHONY: api-dep api-dep: # Restore the dependencies. Get gvt if it's not found in $PATH. diff --git a/docs/docs/database.md b/docs/docs/database.md index e9febd45..0ac33c53 100644 --- a/docs/docs/database.md +++ b/docs/docs/database.md @@ -5,7 +5,7 @@ title: Database ## Docker -To get a MySQL running on your computer, we recommend you use [Docker](https://www.docker.com/). You need to make sure it's installed. Docker makes it easy to run software on your computer without having to install to. Docker also makes it easy reset or clear your environment so you can bring up new services like MySQL quickly and easily. This makes testing or working on multiple projects very easy. +To get a MySQL running on your computer, we recommend you use [Docker](https://www.docker.com/). You need to make sure it's installed. Docker makes it easy to run software on your computer without having to install it. Docker also makes it easy reset or clear your environment so you can bring up new services like MySQL quickly and easily. This makes testing or working on multiple projects very easy. You can also install MySQL using `brew install mysql@5.7` on MacOS or install from their [website](https://dev.mysql.com/downloads/installer/), but many of the commands below don't apply. diff --git a/src/app/ui/webpack.config.babel.js b/src/app/ui/webpack.config.babel.js index 02c586a9..6729e81c 100644 --- a/src/app/ui/webpack.config.babel.js +++ b/src/app/ui/webpack.config.babel.js @@ -2,7 +2,7 @@ import { resolve } from "path"; import { CleanWebpackPlugin } from "clean-webpack-plugin"; import HtmlWebpackPlugin from "html-webpack-plugin"; import MiniCssExtractPlugin from "mini-css-extract-plugin"; -import CopyPlugin from "copy-webpack-plugin"; +import CopyWebpackPlugin from "copy-webpack-plugin"; // Try the environment variable, otherwise use root. const ASSET_PATH = process.env.ASSET_PATH || "/"; @@ -18,7 +18,7 @@ var Webpack = { new MiniCssExtractPlugin({ filename: "static/[name].[contenthash].css", }), - new CopyPlugin( + new CopyWebpackPlugin( [ { from: "./static/healthcheck.html", to: "static/" }, { from: "./static/swagger.json", to: "static/" },