create-revo 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -22
- package/cli.js +38 -2
- package/package.json +1 -1
- package/template-nextjs/public/revo.svg +4 -0
- package/template-nextjs/src/app/favicon.ico +0 -0
- package/template-nextjs/src/app/layout.tsx +2 -2
- package/template-nextjs/src/app/page.tsx +16 -14
- package/template-reactjs/index.html +1 -1
- package/template-reactjs/public/favicon.ico +0 -0
- package/template-reactjs/src/App.tsx +13 -11
- package/template-reactjs/src/assets/revo.svg +4 -0
- package/test/README.md +36 -0
- package/test/eslint.config.mjs +25 -0
- package/test/next.config.ts +7 -0
- package/test/package-lock.json +6182 -0
- package/test/package.json +28 -0
- package/test/postcss.config.mjs +5 -0
- package/test/public/revo.png +0 -0
- package/test/src/app/components/dltme +0 -0
- package/test/src/app/favicon.ico +0 -0
- package/test/src/app/globals.css +21 -0
- package/test/src/app/layout.tsx +34 -0
- package/test/src/app/page.tsx +24 -0
- package/test/tsconfig.json +27 -0
- package/template-nextjs/public/revo.png +0 -0
- package/template-reactjs/src/assets/revo.png +0 -0
package/README.md
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
#
|
|
1
|
+
# revo
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**revo** is a modern project setup tool that supports both **React** and **Next.js** projects. It's designed to streamline your workflow by providing clean project structures, pre-configured with **TypeScript** and **Tailwind CSS**, so you can focus on building amazing applications.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## 🚀 Features
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
9
|
+
- **Two Framework Options**: Choose between React (Vite) or Next.js
|
|
10
|
+
- **TypeScript Ready**: Pre-configured TypeScript for type safety
|
|
11
|
+
- **Tailwind CSS**: Fully configured for utility-first styling right out of the box
|
|
12
|
+
- **Latest Dependencies**: Always uses the latest versions of all packages
|
|
13
|
+
- **Interactive Setup**: Simple CLI with progress indicators
|
|
14
|
+
- **Clean Project Structure**: Thoughtfully organized file structure for maintainable code
|
|
13
15
|
|
|
14
16
|
---
|
|
15
17
|
|
|
16
18
|
## 📦 What You Get
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
### React Template (Vite)
|
|
21
|
+
1. **React 18** with TypeScript
|
|
22
|
+
2. **Vite** for lightning-fast development
|
|
23
|
+
3. **Tailwind CSS** for styling
|
|
24
|
+
4. **ESLint** for code quality
|
|
25
|
+
5. **Motion** for animations
|
|
26
|
+
|
|
27
|
+
### Next.js Template
|
|
28
|
+
1. **Next.js 15** with App Router
|
|
29
|
+
2. **TypeScript** for type safety
|
|
30
|
+
3. **Tailwind CSS** for styling
|
|
31
|
+
4. **ESLint** for code quality
|
|
32
|
+
5. **Optimized** for production
|
|
22
33
|
|
|
23
34
|
---
|
|
24
35
|
|
|
@@ -28,21 +39,29 @@
|
|
|
28
39
|
Make sure you have Node.js (>=14.x) and npm/yarn installed.
|
|
29
40
|
|
|
30
41
|
### Create a New Project
|
|
31
|
-
Run the following command to create a new project:
|
|
32
42
|
|
|
43
|
+
**Option 1: With project name**
|
|
44
|
+
```bash
|
|
45
|
+
npx create-revo my-awesome-project
|
|
33
46
|
```
|
|
34
|
-
|
|
47
|
+
|
|
48
|
+
**Option 2: Interactive mode (will prompt for project name)**
|
|
49
|
+
```bash
|
|
50
|
+
npx create-revo
|
|
35
51
|
```
|
|
36
52
|
|
|
37
|
-
###
|
|
53
|
+
### Choose Your Template
|
|
54
|
+
You'll be prompted to choose between:
|
|
55
|
+
1. **React.js** - Vite + TypeScript + Tailwind CSS
|
|
56
|
+
2. **Next.js** - App Router + TypeScript + Tailwind CSS
|
|
38
57
|
|
|
39
|
-
|
|
58
|
+
### Navigate to Your Project
|
|
59
|
+
```bash
|
|
40
60
|
cd [project-name]
|
|
41
61
|
```
|
|
42
62
|
|
|
43
63
|
### Install Dependencies
|
|
44
|
-
|
|
45
|
-
```
|
|
64
|
+
```bash
|
|
46
65
|
npm install
|
|
47
66
|
```
|
|
48
67
|
|
|
@@ -73,17 +92,19 @@ npm run preview
|
|
|
73
92
|
|
|
74
93
|
## 🌟 Feedback & Support
|
|
75
94
|
|
|
76
|
-
If you like
|
|
95
|
+
If you like revo or have suggestions for improvement, let me know!
|
|
77
96
|
You can reach out to me on [Twitter](https://twitter.com/MaybeTarun).
|
|
78
97
|
|
|
79
|
-
Happy coding with
|
|
98
|
+
Happy coding with revo! 🎉
|
|
80
99
|
|
|
81
100
|
---
|
|
82
101
|
|
|
83
102
|
## 🙏 Credits
|
|
84
103
|
|
|
85
|
-
|
|
104
|
+
revo is built on top of amazing open-source tools. A big shoutout to:
|
|
86
105
|
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
89
|
-
- [
|
|
106
|
+
- [React](https://react.dev/) - The library for building user interfaces
|
|
107
|
+
- [Next.js](https://nextjs.org/) - The React framework for production
|
|
108
|
+
- [Vite](https://vitejs.dev/) - The lightning-fast frontend build tool
|
|
109
|
+
- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework for rapid UI development
|
|
110
|
+
- [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript at any scale
|
package/cli.js
CHANGED
|
@@ -64,6 +64,20 @@ function replacePlaceholders(content, placeholderValues) {
|
|
|
64
64
|
return content;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
function updateProgress(percentage, message) {
|
|
68
|
+
const barLength = 20;
|
|
69
|
+
const filledLength = Math.round((percentage / 100) * barLength);
|
|
70
|
+
const bar = '█'.repeat(filledLength) + '░'.repeat(barLength - filledLength);
|
|
71
|
+
|
|
72
|
+
// Clear the current line and move cursor to beginning
|
|
73
|
+
process.stdout.write('\r\x1b[K');
|
|
74
|
+
process.stdout.write(`[${bar}] ${percentage}% - ${message}`);
|
|
75
|
+
|
|
76
|
+
if (percentage === 100) {
|
|
77
|
+
process.stdout.write('\n');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
67
81
|
function copyTemplateFiles(templateType, projectName, targetDir) {
|
|
68
82
|
const templateDir = path.join(__dirname, `template-${templateType}`);
|
|
69
83
|
|
|
@@ -73,14 +87,27 @@ function copyTemplateFiles(templateType, projectName, targetDir) {
|
|
|
73
87
|
process.exit(1);
|
|
74
88
|
}
|
|
75
89
|
|
|
90
|
+
console.log("\nSetting up project...");
|
|
91
|
+
|
|
92
|
+
// Step 1: Create directory
|
|
93
|
+
updateProgress(10, "Creating project directory...");
|
|
76
94
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
77
95
|
|
|
96
|
+
// Step 2: Copy template files
|
|
97
|
+
updateProgress(30, "Copying template files...");
|
|
78
98
|
copyRecursive(templateDir, targetDir);
|
|
79
99
|
|
|
100
|
+
// Step 3: Replace placeholders
|
|
101
|
+
updateProgress(60, "Configuring project files...");
|
|
80
102
|
replacePlaceholdersInDirectory(targetDir, { projectName });
|
|
81
103
|
|
|
82
|
-
// Create .gitignore file
|
|
104
|
+
// Step 4: Create .gitignore file
|
|
105
|
+
updateProgress(80, "Creating .gitignore file...");
|
|
83
106
|
createGitignoreFile(targetDir);
|
|
107
|
+
|
|
108
|
+
// Step 5: Finalizing
|
|
109
|
+
updateProgress(100, "Project setup complete!");
|
|
110
|
+
console.log(""); // New line after progress
|
|
84
111
|
}
|
|
85
112
|
|
|
86
113
|
function createGitignoreFile(projectDir) {
|
|
@@ -140,6 +167,11 @@ function copyRecursive(source, target) {
|
|
|
140
167
|
const files = fs.readdirSync(source);
|
|
141
168
|
|
|
142
169
|
for (const file of files) {
|
|
170
|
+
// Skip node_modules and other system directories
|
|
171
|
+
if (file === 'node_modules' || file === '.git' || file === 'dist' || file === 'build' || file === '.next') {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
|
|
143
175
|
const sourcePath = path.join(source, file);
|
|
144
176
|
const targetPath = path.join(target, file);
|
|
145
177
|
copyRecursive(sourcePath, targetPath);
|
|
@@ -168,6 +200,11 @@ function replacePlaceholdersInDirectory(directory, placeholderValues) {
|
|
|
168
200
|
for (const file of files) {
|
|
169
201
|
const filePath = path.join(directory, file);
|
|
170
202
|
|
|
203
|
+
// Skip node_modules and other system directories
|
|
204
|
+
if (file === 'node_modules' || file === '.git' || file === 'dist' || file === 'build' || file === '.next') {
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
|
|
171
208
|
if (fs.statSync(filePath).isDirectory()) {
|
|
172
209
|
replacePlaceholdersInDirectory(filePath, placeholderValues);
|
|
173
210
|
} else {
|
|
@@ -252,7 +289,6 @@ async function main() {
|
|
|
252
289
|
console.log(`Project created successfully at ${finalTargetDir}`);
|
|
253
290
|
process.chdir(finalTargetDir);
|
|
254
291
|
|
|
255
|
-
console.log("\nProject setup complete!");
|
|
256
292
|
console.log("\nNext steps:");
|
|
257
293
|
console.log("1. Run: npm install");
|
|
258
294
|
console.log("2. Run: npm run dev");
|
package/package.json
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="500" height="500" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="250" cy="250" r="225" fill="#EFF0EF" stroke="#2D2A32" stroke-width="50"/>
|
|
3
|
+
<path d="M247 347L362.5 222.5M362.5 222.5H265M362.5 222.5V317.5" stroke="#2D2A32" stroke-width="50" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
Binary file
|
|
@@ -2,21 +2,23 @@ import Image from 'next/image';
|
|
|
2
2
|
|
|
3
3
|
export default function Home() {
|
|
4
4
|
return (
|
|
5
|
-
<div className="bg-
|
|
5
|
+
<div className="bg-[#EFF0EF] w-screen h-screen flex flex-col justify-center items-center select-none">
|
|
6
6
|
<div className="flex flex-col items-center space-y-2">
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
<div className="flex justify-center items-center space-x-4">
|
|
8
|
+
<Image
|
|
9
|
+
src="/revo.svg"
|
|
10
|
+
alt="revo"
|
|
11
|
+
width={128}
|
|
12
|
+
height={128}
|
|
13
|
+
className="w-32 h-32 md:w-32 md:h-32"
|
|
14
|
+
priority
|
|
15
|
+
/>
|
|
16
|
+
<h1 className="text-[#2D2A32] text-6xl md:text-[10rem] font-semibold leading-none -mt-10">
|
|
17
|
+
revo
|
|
18
|
+
</h1>
|
|
19
|
+
</div>
|
|
20
|
+
<p className="text-[#2D2A32] text-base md:text-lg uppercase text-center max-w-md">
|
|
21
|
+
your project is ready to go
|
|
20
22
|
</p>
|
|
21
23
|
</div>
|
|
22
24
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>
|
|
7
|
+
<title>revo</title>
|
|
8
8
|
<meta name="author" content="Tarun Gupta" />
|
|
9
9
|
<!-- <meta name="keywords" content="" /> -->
|
|
10
10
|
<!-- <meta name="description" content=""/> -->
|
|
Binary file
|
|
@@ -2,18 +2,20 @@ import revo from './assets/revo.svg';
|
|
|
2
2
|
|
|
3
3
|
function App() {
|
|
4
4
|
return (
|
|
5
|
-
<div className="bg-
|
|
5
|
+
<div className="bg-[#EFF0EF] w-screen h-screen flex flex-col justify-center items-center select-none">
|
|
6
6
|
<div className="flex flex-col items-center space-y-2">
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
<div className="flex justify-center items-center space-x-4">
|
|
8
|
+
<img
|
|
9
|
+
src={revo}
|
|
10
|
+
alt="revo"
|
|
11
|
+
className="w-32 h-32 md:w-32 md:h-32"
|
|
12
|
+
/>
|
|
13
|
+
<h1 className="text-[#2D2A32] text-6xl md:text-[10rem] font-semibold leading-none -mt-10">
|
|
14
|
+
revo
|
|
15
|
+
</h1>
|
|
16
|
+
</div>
|
|
17
|
+
<p className="text-[#2D2A32] text-base md:text-lg uppercase text-center max-w-md">
|
|
18
|
+
your project is ready to go
|
|
17
19
|
</p>
|
|
18
20
|
</div>
|
|
19
21
|
</div>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="500" height="500" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="250" cy="250" r="225" fill="#EFF0EF" stroke="#2D2A32" stroke-width="50"/>
|
|
3
|
+
<path d="M247 347L362.5 222.5M362.5 222.5H265M362.5 222.5V317.5" stroke="#2D2A32" stroke-width="50" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
package/test/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-revo`](https://www.npmjs.com/package/create-revo) for test.
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { dirname } from "path";
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
import { FlatCompat } from "@eslint/eslintrc";
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = dirname(__filename);
|
|
7
|
+
|
|
8
|
+
const compat = new FlatCompat({
|
|
9
|
+
baseDirectory: __dirname,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const eslintConfig = [
|
|
13
|
+
...compat.extends("next/core-web-vitals", "next/typescript"),
|
|
14
|
+
{
|
|
15
|
+
ignores: [
|
|
16
|
+
"node_modules/**",
|
|
17
|
+
".next/**",
|
|
18
|
+
"out/**",
|
|
19
|
+
"build/**",
|
|
20
|
+
"next-env.d.ts",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export default eslintConfig;
|