Initial commit
This commit is contained in:
commit
37df98d09c
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/.yarn/** linguist-vendored
|
||||
/.yarn/releases/* binary
|
||||
/.yarn/plugins/**/* binary
|
||||
* text=auto eol=lf
|
||||
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
node_modules
|
||||
.env
|
||||
dist
|
||||
coverage
|
||||
|
||||
.DS_Store
|
||||
2
.husky/pre-commit
Normal file
2
.husky/pre-commit
Normal file
@ -0,0 +1,2 @@
|
||||
# .husky/pre-commit
|
||||
yarn lint-staged
|
||||
4
.lintstagedrc.json
Normal file
4
.lintstagedrc.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"*": ["yarn prettier -u --write"],
|
||||
"*.ts": ["yarn eslint --fix"]
|
||||
}
|
||||
4
.prettierignore
Normal file
4
.prettierignore
Normal file
@ -0,0 +1,4 @@
|
||||
dist
|
||||
coverage
|
||||
.yarn/**/*
|
||||
yarn.lock
|
||||
3
.prettierrc
Normal file
3
.prettierrc
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"tabWidth": 2
|
||||
}
|
||||
14
.vscode/extensions.json
vendored
Normal file
14
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"bierner.github-markdown-preview",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"streetsidesoftware.code-spell-checker-spanish",
|
||||
"usernamehw.errorlens",
|
||||
"bourhaouta.tailwindshades",
|
||||
"austenc.tailwind-docs",
|
||||
"vitest.explorer"
|
||||
]
|
||||
}
|
||||
21
.vscode/settings.json
vendored
Normal file
21
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"cSpell.enabled": true,
|
||||
"cSpell.language": "en,es",
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"files.autoSave": "off",
|
||||
"files.eol": "\n",
|
||||
"javascript.preferences.importModuleSpecifierEnding": "js",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "always",
|
||||
"source.organizeImports": "always"
|
||||
},
|
||||
"search.exclude": {
|
||||
"**/.yarn": true,
|
||||
"**/node_modules": true,
|
||||
"packages/frontend/{android,ios}": true
|
||||
},
|
||||
"typescript.preferences.importModuleSpecifierEnding": "js",
|
||||
"cSpell.words": ["autodocs", "Syntropy"],
|
||||
"typescript.preferences.autoImportFileExcludePatterns": ["**/chai/**"]
|
||||
}
|
||||
925
.yarn/releases/yarn-4.4.1.cjs
vendored
Normal file
925
.yarn/releases/yarn-4.4.1.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
2
.yarnrc.yml
Normal file
2
.yarnrc.yml
Normal file
@ -0,0 +1,2 @@
|
||||
yarnPath: .yarn/releases/yarn-4.4.1.cjs
|
||||
nodeLinker: node-modules
|
||||
0
apps/.gitkeep
Normal file
0
apps/.gitkeep
Normal file
10
eslint.config.js
Normal file
10
eslint.config.js
Normal file
@ -0,0 +1,10 @@
|
||||
// @ts-check
|
||||
|
||||
import eslint from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
...tseslint.configs.strict,
|
||||
...tseslint.configs.stylistic,
|
||||
);
|
||||
33
package.json
Normal file
33
package.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "ulthar-framework",
|
||||
"packageManager": "yarn@4.4.1",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
"packages/**/*",
|
||||
"apps/**/*"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.9.1",
|
||||
"@types/eslint": "^9.6.1",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.9.1",
|
||||
"husky": "^9.1.5",
|
||||
"lint-staged": "^15.2.10",
|
||||
"prettier": "^3.3.3",
|
||||
"tsx": "^4.19.0",
|
||||
"typescript": "^5.5.4",
|
||||
"typescript-eslint": "^8.4.0",
|
||||
"zx": "^8.1.5"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint . --fix --report-unused-disable-directives",
|
||||
"format": "prettier --write .",
|
||||
"test": "yarn workspaces foreach -vvpA run test --run --clearScreen false",
|
||||
"build": "yarn workspaces foreach -vvpA --topological-dev run build",
|
||||
"add-package": "tsx ./scripts/add-package.ts",
|
||||
"postinstall": "husky"
|
||||
}
|
||||
}
|
||||
1
packages/templates/lib/README.md
Normal file
1
packages/templates/lib/README.md
Normal file
@ -0,0 +1 @@
|
||||
# lib-template
|
||||
19
packages/templates/lib/package.json
Normal file
19
packages/templates/lib/package.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "@ulthar/lib-template",
|
||||
"type": "module",
|
||||
"module": "dist/index.js",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"private": true,
|
||||
"packageManager": "yarn@4.1.1",
|
||||
"devDependencies": {
|
||||
"typescript": "^5.5.4",
|
||||
"vitest": "^2.0.5"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "vitest",
|
||||
"build": "tsc -p tsconfig.build.json"
|
||||
}
|
||||
}
|
||||
0
packages/templates/lib/src/index.ts
Normal file
0
packages/templates/lib/src/index.ts
Normal file
15
packages/templates/lib/tsconfig.build.json
Normal file
15
packages/templates/lib/tsconfig.build.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": false,
|
||||
"allowImportingTsExtensions": false,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"exclude": [
|
||||
"src/**/*.spec.ts",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"coverage",
|
||||
"vitest.config.ts"
|
||||
]
|
||||
}
|
||||
4
packages/templates/lib/tsconfig.json
Normal file
4
packages/templates/lib/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"exclude": ["dist", "node_modules"]
|
||||
}
|
||||
10
packages/templates/lib/vitest.config.ts
Normal file
10
packages/templates/lib/vitest.config.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
coverage: {
|
||||
exclude: ["**/index.ts"],
|
||||
},
|
||||
passWithNoTests: true,
|
||||
},
|
||||
});
|
||||
24
scripts/add-package.ts
Normal file
24
scripts/add-package.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import "zx/globals";
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
console.log("Usage: add-package.ts <package-name>");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const packagePath = process.argv[2];
|
||||
|
||||
const packageName = path.basename(packagePath);
|
||||
|
||||
await $`yarn packages/${packagePath} init`;
|
||||
|
||||
await $`cp -r packages/templates/lib/* packages/${packagePath}`;
|
||||
|
||||
await Promise.all(
|
||||
fs.readdirSync(`packages/${packagePath}`).map(async (file) => {
|
||||
if (fs.statSync(`packages/${packagePath}/${file}`).isFile()) {
|
||||
await $`sed -i 's/lib-template/${packageName}/g' packages/${packagePath}/${file}`;
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
await $`yarn install`;
|
||||
35
tsconfig.json
Normal file
35
tsconfig.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "ESNext",
|
||||
|
||||
/* Modules */
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true,
|
||||
|
||||
/* Emit */
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"noEmit": true,
|
||||
|
||||
/* Interop Constraints */
|
||||
"isolatedModules": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true,
|
||||
|
||||
/* Completeness */
|
||||
"skipDefaultLibCheck": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
1
vitest.workspace.js
Normal file
1
vitest.workspace.js
Normal file
@ -0,0 +1 @@
|
||||
export default ["apps/**/vitest.config.ts", "packages/**/vitest.config.ts"];
|
||||
Loading…
Reference in New Issue
Block a user