1
Fork 0

Initial commit

This commit is contained in:
Hadeed 2024-05-01 11:08:21 +05:00
commit 04ac2eeb0d
7 changed files with 77 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
node_modules/
dist/

26
index.html Normal file
View file

@ -0,0 +1,26 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div id="root"></div>
<script type="module">
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./src/app.jsx";
createRoot(document.getElementById("root")).render(
React.createElement(
React.StrictMode,
null,
React.createElement(App, null),
),
);
</script>
</body>
</html>

28
package.json Normal file
View file

@ -0,0 +1,28 @@
{
"type": "module",
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"prettier": "^3.3.2",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.4",
"vite": "^5.3.1"
},
"prettier": {
"plugins": [
"prettier-plugin-css-order",
"prettier-plugin-tailwindcss"
]
},
"postcss": {
"plugins": {
"tailwindcss": {},
"autoprefixer": {}
}
}
}

3
src/app.jsx Normal file
View file

@ -0,0 +1,3 @@
export default () => (
<h1 className="text-4xl font-extrabold">Using React and Tailwind</h1>
);

3
styles.css Normal file
View file

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

8
tailwind.config.js Normal file
View file

@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.jsx"],
theme: {
extend: {},
},
plugins: [],
};

7
vite.config.js Normal file
View file

@ -0,0 +1,7 @@
import { defineConfig } from "vite";
export default defineConfig({
esbuild: {
jsxInject: `import React from 'react'`,
},
});