feat(create-turbo): create with-vite-react

This commit is contained in:
Turbobot
2026-01-05 13:41:53 +07:00
committed by Firman Ramdhani
commit 43b929db64
32 changed files with 2288 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
ignorePatterns: [".eslintrc.cjs"],
extends: ["@repo/eslint-config/index.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
};
+11
View File
@@ -0,0 +1,11 @@
import React, { useState } from "react";
export const Counter: React.FC = () => {
const [count, setCount] = useState(0);
return (
<button id="counter" type="button" onClick={() => setCount(count + 1)}>
{count}
</button>
);
};
+13
View File
@@ -0,0 +1,13 @@
import React from "react";
interface HeaderProps {
title: string;
}
export const Header: React.FC<HeaderProps> = ({ title }) => {
return (
<header id="header">
<h1>{title}</h1>
</header>
);
};
+2
View File
@@ -0,0 +1,2 @@
export * from "./header";
export * from "./counter";
+2
View File
@@ -0,0 +1,2 @@
// components
export * from "./components";
+26
View File
@@ -0,0 +1,26 @@
{
"name": "@repo/ui",
"version": "0.0.0",
"exports": {
".": "./index.ts",
"./counter": "./components/counter.ts",
"./header": "./components/header.ts",
"./setup-counter": "./utils/counter.ts"
},
"license": "MIT",
"scripts": {
"lint": "eslint \"**/*.ts\""
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"eslint": "^8.57.0",
"typescript": "5.5.4"
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"extends": "@repo/typescript-config/react-library.json",
"include": ["."],
"exclude": ["node_modules"]
}