Skip to content

Commit

Permalink
feat(makefile): run wihout starting app container
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Mar 2, 2023
1 parent e7abc8a commit f439570
Show file tree
Hide file tree
Showing 7 changed files with 18,556 additions and 23 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ BUILDER ?= $(BUILDER_PARAMS) $(SUPPORT_IMAGE)
# Shorthand envsubst command, executed through build-deps
ENVSUBST ?= $(BUILDER) envsubst

APP_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app
APP_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps -e FORCE_COLOR=1 app
NPM_BIN ?= /bin/pnpm
NPM_RUNNER ?= $(APP_RUNNER) $(NPM_BIN)
NPM_COMPOSE_RUNNER ?= $(DOCKER_COMPOSE) exec -T -e FORCE_COLOR=1 app $(NPM_BIN) run
Expand Down Expand Up @@ -206,39 +206,39 @@ storybook-restart: ## Restart storybook container
# ------------------------------------------------------------------------------------
lint: ## Run lint task to fix issues
# $(NPM_RUNNER) lint
$(NPM_COMPOSE_RUNNER) lint:fix
$(NPM_RUNNER) lint:fix
.PHONY: lint

lint-staged: ## Lint staged files
$(NPM_COMPOSE_RUNNER) lint:staged
$(NPM_RUNNER) lint:staged
.PHONY: lint-staged

lint-commits: ## Run commitlint to check commit message
$(DOCKER_COMPOSE) exec -T -e FORCE_COLOR=1 app npx --no --commitlint --edit $(1)
.PHONY: lint-commits

lint-md: ## Lint markdown files
$(NPM_COMPOSE_RUNNER) lint:md
$(NPM_RUNNER) lint:md
.PHONY: lint-md

lint-dist:
$(NPM_COMPOSE_RUNNER) lint:dist
$(NPM_RUNNER) lint:dist
.PHONY: lint-dist

lint-html: ## Lint html files
$(NPM_COMPOSE_RUNNER) lint:html
$(NPM_RUNNER) lint:html
.PHONY: lint-html

lint-css: ## Lint css files
$(NPM_COMPOSE_RUNNER) lint:css
$(NPM_RUNNER) lint:css
.PHONY: lint-css

lint-secrets: ## Check if there are any missed secret credentials in code
$(NPM_COMPOSE_RUNNER) lint:secrets
$(NPM_RUNNER) lint:secrets
.PHONY: lint-secrets

lint-browsers: ## Lint browserslist
$(NPM_COMPOSE_RUNNER) lint:browsers
$(NPM_RUNNER) lint:browsers
.PHONY: lint-browsers

lint-yaml: ## Lints yaml files inside project
Expand All @@ -250,15 +250,15 @@ lint-actions: ## Lint github actions using actionlint
.PHONY: lint-actions

test: ## Run unit tests
$(NPM_COMPOSE_RUNNER) test:unit
$(NPM_RUNNER) test:unit
.PHONY: test

format: ## Run prettier formatting
$(NPM_COMPOSE_RUNNER) format
$(NPM_RUNNER) format
.PHONY: format

sort: ## Sort package.json across project
$(NPM_COMPOSE_RUNNER) lint:package-json
$(NPM_RUNNER) lint:package-json
.PHONY: sort

analyze: ## Run bundle-analyzer
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "18.14.2",
"@types/node": "18.14.4",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@wayofdev/eslint-config-bases": "2.0.4",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"clsx": "^1.2.1",
"i18next": "^22.4.10",
"next": "^13.2.3",
"next-auth": "^4.19.2",
"next-i18next": "^13.1.6",
"next-auth": "^4.20.0",
"next-i18next": "^13.2.1",
"next-seo": "^5.15.0",
"next-sitemap": "^3.1.55",
"react": "^18.2.0",
Expand All @@ -43,7 +43,7 @@
},
"devDependencies": {
"@next/bundle-analyzer": "13.2.3",
"@sentry/nextjs": "^7.39.0",
"@sentry/nextjs": "^7.40.0",
"@size-limit/file": "^8.2.4",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3",
Expand All @@ -54,7 +54,7 @@
"@types/facebook-pixel": "^0.0.24",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "29.4.0",
"@types/node": "^18.14.2",
"@types/node": "^18.14.4",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@types/react-test-renderer": "^18.0.0",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "2.26.0",
"@commitlint/cli": "^17.4.4",
"@types/node": "^18.14.2",
"@types/node": "^18.14.4",
"@types/prettier": "^2.7.2",
"@types/shell-quote": "^1.7.1",
"@wayofdev/browserslist-config": "^2.0.2",
Expand All @@ -104,7 +104,7 @@
"markdownlint-cli": "^0.33.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"rimraf": "^4.1.2",
"rimraf": "^4.1.3",
"secretlint": "^6.2.3",
"shell-quote": "^1.8.0",
"sort-package-json": "^2.4.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/common-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
},
"devDependencies": {
"@types/jest": "^29.4.0",
"@types/node": "^18.14.2",
"@types/node": "^18.14.4",
"@wayofdev/eslint-config-bases": "^2.0.4",
"eslint": "^8.35.0",
"prettier": "^2.8.4",
"rimraf": "^4.1.2",
"rimraf": "^4.1.3",
"typescript": "^4.9.5"
}
}
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
"@types/jest": "29.4.0",
"@types/node": "18.14.2",
"@types/node": "18.14.4",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@types/react-test-renderer": "18.0.0",
Expand All @@ -43,7 +43,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-test-renderer": "18.2.0",
"rimraf": "4.1.2",
"rimraf": "4.1.3",
"sanitize.css": "13.0.0",
"tailwindcss": "3.2.7",
"ts-jest": "29.0.5",
Expand Down
Loading

0 comments on commit f439570

Please sign in to comment.