feat: add basic webui

This commit is contained in:
2024-12-30 06:39:09 +08:00
parent 608a7fb9c6
commit a4c549e7c3
462 changed files with 35900 additions and 2491 deletions

View File

@@ -0,0 +1,37 @@
import type { PlopTypes } from '@turbo/gen';
export default function generator(plop: PlopTypes.NodePlopAPI): void {
plop.setGenerator('init', {
description: 'Generate a new package for the Monorepo',
prompts: [
{
type: 'input',
name: 'name',
message:
'What is the name of the package? (You can skip the `@konobangu/` prefix)',
},
],
actions: [
(answers) => {
if (
'name' in answers &&
typeof answers.name === 'string' &&
answers.name.startsWith('@konobangu/')
) {
answers.name = answers.name.replace('@konobangu/', '');
}
return 'Config sanitized';
},
{
type: 'add',
path: 'packages/{{ name }}/package.json',
templateFile: 'templates/package.json.hbs',
},
{
type: 'add',
path: 'packages/{{ name }}/tsconfig.json',
templateFile: 'templates/tsconfig.json.hbs',
},
],
});
}

View File

@@ -0,0 +1,3 @@
{
"type": "commonjs"
}

View File

@@ -0,0 +1,9 @@
{
"name": "@konobangu/{{ name }}",
"private": true,
"version": "0.0.0",
"scripts": {
"clean": "git clean -xdf .cache .turbo dist node_modules",
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
}
}

View File

@@ -0,0 +1,12 @@
{
"extends": "@konobangu/typescript-config/react-library.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"],
"@konobangu/*": ["../../packages/*"]
}
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}