graphql-engine/scripts/make/frontend.mk
Samir Talwar 17855bf65a make: Add make targets for formatting and linting frontend code.
This adds linting and formatting of frontend code when running `make lint`, `make format`, or any of the variations.

I am adding this because I didn't know how to check the code and so I had to wait for CI to fail, which I found irritating.

In order to make this reasonable, I factored out `make` targets for building *frontend/node_modules*, so I could depend on them.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8463
GitOrigin-RevId: 71882ec90490efbf87d428d08eaec2ae849a0a36
2023-03-23 15:16:14 +00:00

13 lines
419 B
Makefile

.PHONY: build-console-assets
## build-console-assets
build-console-assets: frontend/node_modules
cd frontend && npm run server-build:ce
# Install node_modules if package-lock.json changes
frontend/node_modules: frontend/package-lock.json
cd frontend && npm install && touch node_modules
# Cleanly install node_modules if package.json changes
frontend/package-lock.json: frontend/package.json
cd frontend && npm ci