diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 000000000..d6a1c5742 --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,3 @@ +{ + "package-lock.json": "make lint/lock" +} diff --git a/Makefile b/Makefile index 05b26afb0..6a5583fa4 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,18 @@ SHELL := /usr/bin/env bash -MK := ./packages/kuma-gui/mk +MK := ./packages/config/src/mk + +## make help: if you're aren't sure use `make help` +.DEFAULT_GOAL := help include $(MK)/install.mk include $(MK)/check.mk +include $(MK)/help.mk .PHONY: clean clean: .clean ## Dev: Remove all `node_modules` recursively .PHONY: install install: .install ## Dev: Install all dependencies + +.PHONY: help +help: .help ## Display this help screen diff --git a/packages/config/.lintstagedrc.json b/packages/config/.lintstagedrc.json index 552ab2e4c..254d9f1d6 100644 --- a/packages/config/.lintstagedrc.json +++ b/packages/config/.lintstagedrc.json @@ -1,3 +1,3 @@ { - "*.{cjs,js,ts}": "make lint" + "*.{cjs,js,ts,vue}": "make lint" } diff --git a/packages/config/Makefile b/packages/config/Makefile index e71e7fc12..66ec1de34 100644 --- a/packages/config/Makefile +++ b/packages/config/Makefile @@ -1,6 +1,13 @@ -MK := ../kuma-gui/mk +MK := ./src/mk + +## make help: if you're aren't sure use `make help` +.DEFAULT_GOAL := help include $(MK)/check.mk +include $(MK)/help.mk + +.PHONY: help +help: .help ## Display this help screen .PHONY: lint lint: .lint/script ## Dev: Run all lint script checks (js,ts) diff --git a/packages/kuma-gui/mk/build.mk b/packages/config/src/mk/build.mk similarity index 100% rename from packages/kuma-gui/mk/build.mk rename to packages/config/src/mk/build.mk diff --git a/packages/kuma-gui/mk/check.mk b/packages/config/src/mk/check.mk similarity index 100% rename from packages/kuma-gui/mk/check.mk rename to packages/config/src/mk/check.mk diff --git a/packages/kuma-gui/mk/help.mk b/packages/config/src/mk/help.mk similarity index 100% rename from packages/kuma-gui/mk/help.mk rename to packages/config/src/mk/help.mk diff --git a/packages/kuma-gui/mk/install.mk b/packages/config/src/mk/install.mk similarity index 100% rename from packages/kuma-gui/mk/install.mk rename to packages/config/src/mk/install.mk diff --git a/packages/kuma-gui/mk/release.mk b/packages/config/src/mk/release.mk similarity index 100% rename from packages/kuma-gui/mk/release.mk rename to packages/config/src/mk/release.mk diff --git a/packages/kuma-gui/mk/run.mk b/packages/config/src/mk/run.mk similarity index 100% rename from packages/kuma-gui/mk/run.mk rename to packages/config/src/mk/run.mk diff --git a/packages/kuma-gui/mk/test.mk b/packages/config/src/mk/test.mk similarity index 100% rename from packages/kuma-gui/mk/test.mk rename to packages/config/src/mk/test.mk diff --git a/packages/kuma-gui/.lintstagedrc.json b/packages/kuma-gui/.lintstagedrc.json index 0e26b2ba6..0e5d89f3b 100644 --- a/packages/kuma-gui/.lintstagedrc.json +++ b/packages/kuma-gui/.lintstagedrc.json @@ -1,5 +1,4 @@ { - "*.{js,ts,vue}": "make -C ./packages/kuma-gui -j2 lint/script", - "*.{css,scss,vue}": "make -C ./packages/kuma-gui lint/css", - "package-lock.json": "make -C ./packages/kuma-gui lint/lock" + "*.{cjs,js,ts,vue}": "make -j2 .lint/script", + "*.{css,scss,vue}": "make lint/css" } diff --git a/packages/kuma-gui/Makefile b/packages/kuma-gui/Makefile index 7928ae21f..bae2f57d0 100644 --- a/packages/kuma-gui/Makefile +++ b/packages/kuma-gui/Makefile @@ -2,7 +2,7 @@ # It should only be used for adding "non-dot" aliases and documentation SHELL := /usr/bin/env bash -MK := ./mk +MK := ../config/src/mk NODE_VERSION:=v$(shell cat ../../.nvmrc) NPM_WORKFLOW_CONFIG_PATH ?= $(shell readlink -f ../config) @@ -28,9 +28,6 @@ install/sync: .install/sync .PHONY: help help: .help ## Display this help screen -.PHONY: clean -clean: .clean ## Dev: Delete all node_modules directories - .PHONY: install install: .install ## Dev: install all dependencies (runs before `make run`)