Skip to content

Commit

Permalink
Introduce turborepo to manage dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed Apr 18, 2023
1 parent 199cfa4 commit 716ab49
Show file tree
Hide file tree
Showing 14 changed files with 254 additions and 241 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ install-kind:

.PHONY: install-playwright
install-playwright:
npx --workspace $(example_dir) playwright install
npm --workspace $(example_dir) run pree2e

.PHONY: test
test: run-playwright

.PHONY: run-playwright
run-playwright: setup-serviceaccount $(example_dir)/.env
npx --workspace $(example_dir) playwright test
npx turbo --filter=./$(example_dir) run e2e

.PHONY: setup-serviceaccount
setup-serviceaccount: export KUBECONFIG=$(kubeconfig)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm run lint --workspaces --if-present
- run: npm run lint

test:
runs-on: ubuntu-latest
Expand All @@ -25,7 +25,7 @@ jobs:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm run test --workspaces --if-present
- run: npm run test

dist:
runs-on: ubuntu-latest
Expand All @@ -36,7 +36,7 @@ jobs:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm run build --workspaces --if-present
- run: npm run build

e2e:
timeout-minutes: 60
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules/

# Optional npm cache directory
.npm
.turbo

# Optional eslint cache
.eslintcache
Expand All @@ -24,9 +25,6 @@ node_modules/
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# generated output
dist

Expand Down
26 changes: 2 additions & 24 deletions examples/fetch/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
{
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
]
},
"plugins": ["prettier"]
}
]
"root": true,
"extends": ["custom"]
}
11 changes: 6 additions & 5 deletions examples/fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"name": "@ccremer/kubernetes-client-example-fetch",
"scripts": {
"format": "prettier --write ./**/*.{js,html,ts,json,html}",
"format": "prettier --write ./**/*.{js,html,ts,json}",
"lint": "eslint './**/*.{js,ts}'",
"prelint": "npm run format",
"dev": "vite",
"build": "vite build",
"e2e-install": "npx playwright install --with-deps",
"e2e": "npx playwright test"
"pree2e": "playwright install",
"e2e": "playwright test"
},
"devDependencies": {
"@playwright/test": "1.32.3",
"@types/bootstrap": "5.2.6",
"@types/node": "18.15.11",
"dotenv": "16.0.3",
"sass": "1.62.0",
"vite": "4.2.1"
"vite": "4.2.1",
"eslint-config-custom": "*"
},
"dependencies": {
"bootstrap": "5.2.3",
"@ccremer/kubernetes-client": "0.1.0"
"@ccremer/kubernetes-client": "*"
}
}
Loading

0 comments on commit 716ab49

Please sign in to comment.