Skip to content

Commit

Permalink
scaffolding it out
Browse files Browse the repository at this point in the history
  • Loading branch information
DopamineDriven committed Nov 15, 2024
0 parents commit 8cbd08e
Show file tree
Hide file tree
Showing 34 changed files with 10,615 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
tab_width = 4
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 0

[{*.c,*.cc,*.h,*.hh,*.cpp,*.hpp,*.m,*.mm,*.mpp,*.js,*.cjs,*.mjs,*.mts,*.cts,*.java,*.go,*.rs,*.php,*.ng,*.jsx,*.ts,*.tsx,*.d,*.cs,*.swift}]
curly_bracket_next_line = false
spaces_around_operators = true
spaces_around_brackets = outside

# close enough to 1TB
indent_brace_style = K&R

[*.module.css]
max_line_length = 40
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# turbo
.turbo
.vercel


.idea
dist
notes.md
.env*.local

schema.graphql
.npmrc
7 changes: 7 additions & 0 deletions .npmrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//registry.npmjs.org/:_authToken=
//registry.npmjs.org/:_password=
//registry.npmjs.org/:username=
email=
enable-pre-post-scripts=true
node-linker=hoisted
link-workspace-packages=true
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"meganrogge.template-string-converter",
"pflannery.vscode-versionlens",
"ms-vscode.vscode-typescript-next",
"donjayamanne.githistory",
"ipatalas.vscode-postfix-ts",
"prisma.prisma",
"abians.prisma-generate-uml"
],
"unwantedRecommendations": []
}
73 changes: 73 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[postcss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"C_Cpp.dimInactiveRegions": false,
"css.completion.completePropertyWithSemicolon": true,
"css.format.enable": true,
"css.format.newlineBetweenSelectors": true,
"css.hover.documentation": true,
"css.hover.references": true,
"editor.bracketPairColorization.enabled": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.suggest.showStatusBar": true,
"eslint.enable": true,
"eslint.useFlatConfig": true,
"eslint.rules.customizations": [
{
"rule": "*",
"severity": "warn"
}
],
"eslint.workingDirectories": [
{
"mode": "auto"
},
{
"pattern": "apps/*/"
},
{
"pattern": "packages/*/"
},
{
"pattern": "tooling/*/"
}
],
"files.autoSave": "afterDelay",
"gitlens.statusBar.enabled": true,
"javascript.referencesCodeLens.showOnAllFunctions": true,
"openInDefaultBrowser.run.openWithLocalHttpServer": false,
"tailwindCSS.classAttributes": [
"class",
"className",
"classNames",
"ngClass",
"rootClassName",
".*Variant.*",
".*variant.*",
".*Styles.*",
".*ClassName.*"
],
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsserver.web.typeAcquisition.enabled": true,
"typescript.implementationsCodeLens.enabled": true,
"typescript.implementationsCodeLens.showOnInterfaceMethods": true,
"typescript.locale": "en",
"typescript.referencesCodeLens.enabled": true,
"typescript.referencesCodeLens.showOnAllFunctions": true,
"typescript.tsdk": "node_modules/typescript/lib",
"yaml.hover": true,
"yaml.validate": true
}
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import baseConfig from "@turbogen/eslint-config/base";

/** @type {import('typescript-eslint').Config} */
export default [
{
rules: {
"@typescript-eslint/consistent-type-definitions": "off"
},
ignores: ["**node_modules**"]
},
...baseConfig
];
70 changes: 70 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"name": "@turbogen/root",
"version": "0.0.0",
"author": {
"email": "[email protected]",
"name": "Andrew Ross",
"url": "https://github.com/DopamineDriven"
},
"license": "MIT",
"private": true,
"packageManager": "[email protected]+sha512.88c9c3864450350e65a33587ab801acf946d7c814ed1134da4a924f6df5a2120fd36b46aab68f7cd1d413149112d53c7db3a4136624cfd00ff1846a0c6cef48a",
"scripts": {
"clean": "git clean -xdf node_modules",
"dev": "turbo dev --parallel --continue",
"flatten": "awk -v ORS='\\n' '1' flatten.js",
"format": "prettier --write \"**/*.{ts,tsx,cts,mts,js,jsx,mjs,cjs,json,yaml,yml,css,html,md,mdx}\" --ignore-unknown --cache",
"lint": "turbo lint",
"prepare": "husky",
"test": "echo \"Hello from GitHubCI\"",
"typecheck": "turbo typecheck",
"build:web": "turbo build --filter=@turbogen/web",
"clean:house": "cd apps/web && git clean -xdf node_modules .next .turbo && cd ../../tooling/eslint && git clean -xdf node_modules .turbo && cd ../prettier && git clean -xdf node_modules .turbo && cd ../typescript && git clean -xdf node_modules .turbo && cd ../jest-presets && git clean -xdf node_modules .turbo && cd ../.. && git clean -xdf node_modules pnpm-lock.yaml && pnpm latest:pnpm && pnpm build:web",
"condense:privatekey": "awk -v ORS='\\n' '1' private.pem",
"condense:publickey": "awk -v ORS='\\n' '1' public.pem",
"generate:privatekey": "openssl genrsa -out private.pem 2048",
"generate:publickey": "openssl rsa -in private.pem -pubout -out public.pem",
"npm:registry": "npm set registry https://registry.npmjs.org",
"nvm:18": "nvm use 18.18.2",
"nvm:latest": "nvm use node",
"nvm:list:downloadable": "nvm ls-remote",
"nvm:list:installed": "nvm ls",
"nvm:lts": "nvm use --lts",
"nvm:install:node:lts": "nvm install --lts",
"nvm:install:node:latest": "nvm install node --latest-npm",
"nvm:install:npm:latest": "nvm install-latest-npm",
"run:web": "turbo dev --filter=@turbogen/web",
"sync:time": "sudo ntpdate time.windows.com",
"turbo:login": "turbo login",
"turbo:logout": "turbo logout",
"turbo:link": "turbo link",
"latest:pnpm": "corepack use pnpm@latest",
"update:pnpm": "curl -fsSL https://get.pnpm.io/install.sh | sh -",
"generate:base64:secret": "openssl rand -base64 64",
"generate:hex:secret": "openssl rand -hex 64"
},
"devDependencies": {
"@changesets/cli": "^2.27.9",
"@turbogen/eslint-config": "workspace:*",
"@turbogen/prettier-config": "workspace:*",
"@turbogen/tsconfig": "workspace:*",
"@total-typescript/ts-reset": "^0.6.1",
"@types/node": "^22.9.0",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.4.2",
"dotenv-expand": "^11.0.7",
"eslint": "^9.15.0",
"husky": "^9.1.6",
"prettier": "^3.3.3",
"tsx": "latest",
"turbo": "latest",
"typescript": "latest",
"vercel": "latest"
},
"prettier": "@turbogen/prettier-config",
"engines": {
"node": ">=20",
"npm": ">=10",
"pnpm": ">=8"
}
}
102 changes: 102 additions & 0 deletions packages/turbogen/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"name": "@turbogen/turbogen",
"version": "0.1.0",
"description": "rapidly generate a tooling-configured pnpm turborepo via the cli",
"publishConfig": {
"access": "public",
"typesVersions": {
"*": {
"*": [
"dist/*.d.ts",
"dist/*/index.d.ts"
],
"bin": [
"dist/bin/init.d.ts"
],
"config": [
"dist/config/index.d.ts"
],
"types": [
"dist/types/index.d.ts"
]
}
}
},
"license": "MIT",
"source": "src/index.ts",
"bin": {
"tdturbo": "dist/bin/init.js"
},
"typesVersions": {
"*": {
"*": [
"dist/*.d.ts",
"dist/*/index.d.ts"
],
"bin": [
"dist/bin/init.d.ts"
],
"config": [
"dist/config/index.d.ts"
],
"types": [
"dist/types/index.d.ts"
]
}
},
"type": "module",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"sideEffects": true,
"files": [
"dist/**/*.{js,cjs,d.ts,d.cts,css}"
],
"exports": {
".": "./dist/index.js",
"./*": "./dist/*.js",
"./bin": "./dist/bin/init.js"
},
"scripts": {
"prebuild": "rm -rf dist",
"build": "tsup",
"dev": "pnpm build",
"lint": "eslint",
"clean": "git clean -xdf .cache .turbo dist node_modules",
"fix": "npm pkg fix"
},
"dependencies": {
"@inquirer/core": "^10.1.0",
"@inquirer/prompts": "^7.1.0",
"chalk": "^5.3.0",
"dotenv": "^16.4.5",
"gradient-string": "^3.0.0"
},
"devDependencies": {
"@inquirer/type": "^3.0.1",
"@microsoft/api-extractor": "^7.47.11",
"@swc/core": "^1.9.2",
"@swc/wasm": "^1.9.2",
"@turbogen/eslint-config": "workspace:*",
"@turbogen/prettier-config": "workspace:*",
"@turbogen/tsconfig": "workspace:*",
"@types/gradient-string": "^1.1.6",
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"chokidar": "^4.0.1",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.4.2",
"dotenv-expand": "^11.0.7",
"eslint": "^9.15.0",
"fast-xml-parser": "^4.5.0",
"next": "latest",
"prettier": "^3.3.3",
"react": "^18.3.1",
"terser": "^5.36.0",
"tslib": "^2.8.1",
"tsup": "latest",
"tsx": "latest",
"typescript": "latest",
"yaml": "^2.6.0"
},
"prettier": "@takeda-digital/prettier-config"
}
Loading

0 comments on commit 8cbd08e

Please sign in to comment.