-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup: add wrapper
superturbo
for turbo
to set some default values
- Loading branch information
1 parent
b488972
commit 0815c80
Showing
10 changed files
with
229 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm exec turbo build lint | ||
pnpm exec superturbo build lint | ||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,18 @@ | |
"nuke:artifacts": "pnpm --parallel run nuke:artifacts", | ||
"nuke:compute-cache": "del-cli \"*/**/.turbo\"", | ||
"nuke:node-modules": "del-cli \"**/node_modules\"", | ||
"lint": "turbo lint", | ||
"lint:fix": "turbo lint:fix", | ||
"lint": "superturbo lint", | ||
"lint:fix": "superturbo lint:fix", | ||
"format": "prettier --write --ignore-unknown .", | ||
"build": "turbo build", | ||
"build": "superturbo build", | ||
"dev": "pnpm --parallel --filter=\"./packages/*\" run dev", | ||
"create-pnpm-patch-via-ts-patch": "pnpm --package=\"@pkerschbaum/[email protected]\" dlx create-pnpm-patch-via-ts-patch --typescript-version=5.2.2" | ||
}, | ||
"devDependencies": { | ||
"@pkerschbaum-homepage/config-eslint": "workspace:*", | ||
"@pkerschbaum-homepage/config-stylelint": "workspace:*", | ||
"@pkerschbaum-homepage/config-typescript": "workspace:*", | ||
"@pkerschbaum-homepage/superturbo": "workspace:*", | ||
"del-cli": "^5.1.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^15.0.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// @ts-check | ||
const baseEslintConfig = require('@pkerschbaum-homepage/config-eslint/eslint-ecma.cjs'); | ||
|
||
module.exports = { | ||
...baseEslintConfig, | ||
parserOptions: { | ||
...baseEslintConfig.parserOptions, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
rules: { | ||
...baseEslintConfig.rules, | ||
'n/no-process-env': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @ts-check | ||
import { | ||
baseConfig, | ||
jsConfig, | ||
} from '@pkerschbaum-homepage/config-lint-staged/lint-staged-base.mjs'; | ||
|
||
export default { | ||
...baseConfig, | ||
...jsConfig, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "@pkerschbaum-homepage/superturbo", | ||
"private": true, | ||
"type": "module", | ||
"bin": { | ||
"superturbo": "./src/turbo-wrapper.mjs" | ||
}, | ||
"scripts": { | ||
"internal:build:compile": "tsc -p ./tsconfig.build.json", | ||
"nuke": "pnpm run nuke:artifacts && del-cli --dot=true node_modules", | ||
"nuke:artifacts": "del-cli --dot=true *.tsbuildinfo", | ||
"build": "pnpm run internal:build:compile", | ||
"dev": "pnpm run internal:build:compile -w --preserveWatchOutput", | ||
"lint": "pnpm run lint:js", | ||
"lint:fix": "pnpm run lint:js:file . --fix", | ||
"lint:js": "pnpm run lint:js:file .", | ||
"lint:js:file": "eslint --max-warnings 0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.8.7", | ||
"@typescript-eslint/eslint-plugin": "^6.8.0", | ||
"@typescript-eslint/parser": "^6.8.0", | ||
"eslint": "^8.52.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-code-import-patterns": "^3.0.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-n": "^16.2.0", | ||
"eslint-plugin-only-warn": "^1.1.0", | ||
"eslint-plugin-regexp": "^2.1.0", | ||
"eslint-plugin-unicorn": "^48.0.1", | ||
"typescript": "^5.2.2", | ||
"typescript-transform-paths": "^3.4.6" | ||
}, | ||
"peerDependencies": { | ||
"turbo": "^1.10.16" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* this module is a simple wrapper for "turbo" which | ||
* - if no explicit "concurrency" is given, sets a default of 100% (to utilize all logical processors, see https://turbo.build/repo/docs/reference/command-line-reference/run#--concurrency) | ||
* - and sets some default CLI arguments (e.g. "--env-mode=strict") | ||
*/ | ||
import { spawn } from 'node:child_process'; | ||
import { argv } from 'node:process'; | ||
import url from 'node:url'; | ||
|
||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); | ||
|
||
const [_execPath, _jsFilePath, ...commandLineArguments] = argv; | ||
|
||
commandLineArguments.push( | ||
'--no-update-notifier', | ||
'--env-mode=strict', | ||
'--framework-inference=false', | ||
); | ||
|
||
if (!commandLineArguments.some((arg) => arg.startsWith('--concurrency'))) { | ||
commandLineArguments.push('--concurrency=100%'); | ||
} | ||
|
||
spawn('turbo', commandLineArguments, { | ||
cwd: process.cwd(), | ||
stdio: 'inherit', | ||
env: process.env, | ||
// set shell to true for windows (https://stackoverflow.com/a/54515183) | ||
shell: process.platform === 'win32', | ||
}).on('exit', (code) => { | ||
if (code !== null) { | ||
process.exitCode = code; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "@pkerschbaum-homepage/config-typescript/tsconfig.json", | ||
"compilerOptions": { | ||
/* Modules */ | ||
"module": "node16", | ||
"types": ["node"], | ||
"paths": { | ||
"#pkg/*": ["./src/*"] | ||
}, | ||
"rootDir": "./src", | ||
|
||
/* Emit */ | ||
"noEmit": true, | ||
|
||
/* JavaScript Support */ | ||
"checkJs": true | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["**/node_modules", "**/*.spec.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
/* Modules */ | ||
"paths": { | ||
"#pkg/*": ["./src/*"], | ||
"#pkg-test/*": ["./test/*"] | ||
}, | ||
"rootDir": null, | ||
"rootDirs": ["./src", "./test"] | ||
}, | ||
"include": ["src/**/*", "test/**/*"], | ||
"exclude": ["**/node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"extends": ["//"], | ||
"pipeline": { | ||
"build": { | ||
"cache": true, | ||
"inputs": [ | ||
"../../platform/config-typescript/tsconfig.json", | ||
"src/**", | ||
"test/**", | ||
"package.json", | ||
"tsconfig.build.json" | ||
], | ||
"outputs": ["*.tsbuildinfo"] | ||
}, | ||
"lint": { | ||
"cache": true, | ||
"inputs": [ | ||
"../../platform/config-typescript/tsconfig.json", | ||
"../../platform/config-eslint/eslint-ecma.cjs", | ||
"src/**", | ||
"test/**", | ||
".eslintrc.js", | ||
"package.json", | ||
"tsconfig.build.json", | ||
"tsconfig.project.json" | ||
], | ||
"outputs": [] | ||
}, | ||
"lint:fix": { | ||
"cache": true, | ||
"inputs": [ | ||
"../../platform/config-typescript/tsconfig.json", | ||
"../../platform/config-eslint/eslint-ecma.cjs", | ||
"src/**", | ||
"test/**", | ||
".eslintrc.js", | ||
"package.json", | ||
"tsconfig.build.json", | ||
"tsconfig.project.json" | ||
], | ||
"outputs": ["src/**", "test/**"] | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
0815c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pkerschbaum-homepage – ./
pkerschbaum-homepage-git-main-pkerschbaum.vercel.app
pkerschbaum-homepage-pkerschbaum.vercel.app
pkerschbaum.com
www.pkerschbaum.com