create-react-adam 0.1.2 → 0.2.1

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/bin/index.js CHANGED
@@ -163,7 +163,7 @@ async function main() {
163
163
  const excludePaths = [];
164
164
 
165
165
  if (!includeE2E) {
166
- excludePaths.push('e2e', 'playwright.config.ts', '.e2e-deps.json');
166
+ excludePaths.push('e2e');
167
167
  }
168
168
 
169
169
  if (!includeUtils) {
@@ -196,23 +196,14 @@ async function main() {
196
196
  await replaceInFile(join(projectPath, 'index.html'), replacements);
197
197
  await replaceInFile(join(projectPath, 'README.md'), replacements);
198
198
 
199
- if (includeE2E) {
200
- const e2eDepsPath = join(projectPath, '.e2e-deps.json');
201
- const packageJsonPath = join(projectPath, 'package.json');
202
-
203
- const e2eDeps = JSON.parse(await readFile(e2eDepsPath, 'utf-8'));
204
- const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf-8'));
205
-
206
- packageJson.scripts = { ...packageJson.scripts, ...e2eDeps.scripts };
207
- packageJson.devDependencies = { ...packageJson.devDependencies, ...e2eDeps.devDependencies };
208
-
209
- await writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
210
- await rm(e2eDepsPath);
211
- }
212
-
213
199
  console.log('\nInstalling dependencies...');
214
200
  await runCommand('npm', ['install'], projectPath);
215
201
 
202
+ if (includeE2E) {
203
+ console.log('\nInstalling E2E dependencies...');
204
+ await runCommand('npm', ['install'], join(projectPath, 'e2e'));
205
+ }
206
+
216
207
  console.log('\n✓ Success! Created', projectName, 'at', projectPath);
217
208
  console.log('\nInside that directory, you can run several commands:\n');
218
209
  console.log(' npm run dev');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-react-adam",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "Create opinionated React apps with TypeScript, Vite, Wouter, and Tailwind CSS",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v5
15
+ - uses: actions/checkout@v6
16
16
 
17
17
  - name: Setup Node.js
18
18
  uses: actions/setup-node@v6
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v5
15
+ - uses: actions/checkout@v6
16
16
 
17
17
  - name: Setup Node.js
18
18
  uses: actions/setup-node@v6
@@ -20,15 +20,19 @@ jobs:
20
20
  node-version: "24.11.1"
21
21
  cache: "npm"
22
22
 
23
- - name: Install CLI dependencies
23
+ - name: Install dependencies
24
+ run: npm install
25
+
26
+ - name: Install E2E dependencies
27
+ working-directory: ./e2e
24
28
  run: npm install
25
29
 
26
30
  - name: Install Playwright browsers
27
- working-directory: ./e2e/
31
+ working-directory: ./e2e
28
32
  run: npx playwright install --with-deps chromium
29
33
 
30
34
  - name: Run E2E tests
31
- working-directory: ./e2e/
35
+ working-directory: ./e2e
32
36
  run: npm run test:e2e
33
37
 
34
38
  - name: Upload Playwright report
@@ -36,7 +40,7 @@ jobs:
36
40
  if: always()
37
41
  with:
38
42
  name: playwright-report
39
- path: ./e2e/playwright-report/
43
+ path: ./e2e/playwright-report
40
44
  retention-days: 30
41
45
 
42
46
  - name: Upload Allure results
@@ -44,5 +48,5 @@ jobs:
44
48
  if: always()
45
49
  with:
46
50
  name: allure-results
47
- path: ./e2e/allure-results/
51
+ path: ./e2e/allure-results
48
52
  retention-days: 30
@@ -1,11 +1,16 @@
1
1
  {
2
+ "name": "e2e-tests",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
2
6
  "scripts": {
3
7
  "test:e2e": "playwright test",
4
8
  "test:e2e:ui": "playwright test --ui",
5
9
  "test:e2e:report": "allure generate ./allure-results --clean && allure open"
6
10
  },
7
11
  "devDependencies": {
8
- "@playwright/test": "1.48.0",
9
- "allure-playwright": "3.0.3"
12
+ "@playwright/test": "1.57.0",
13
+ "allure-playwright": "3.4.2"
10
14
  }
11
15
  }
16
+
@@ -1,12 +1,12 @@
1
1
  import { defineConfig, devices } from "@playwright/test";
2
2
 
3
3
  export default defineConfig({
4
- testDir: "./e2e",
4
+ testDir: ".",
5
5
  fullyParallel: true,
6
6
  forbidOnly: !!process.env.CI,
7
7
  retries: process.env.CI ? 2 : 0,
8
8
  workers: process.env.CI ? 1 : undefined,
9
- reporter: [["html"], ["allure-playwright"]],
9
+ reporter: [["line"], ["allure-playwright"]],
10
10
  use: {
11
11
  baseURL: "http://localhost:5173",
12
12
  trace: "on-first-retry",
@@ -21,5 +21,7 @@ export default defineConfig({
21
21
  command: "npm run dev",
22
22
  url: "http://localhost:5173",
23
23
  reuseExistingServer: !process.env.CI,
24
+ cwd: "..",
24
25
  },
25
26
  });
27
+
@@ -13,18 +13,21 @@
13
13
  "format": "prettier --write .",
14
14
  "setFormatToPrecommitHook": "echo \"#!/bin/bash\\n\\nSTAGED_JS_FILES=\\$(git diff --cached --name-only --diff-filter=ACM | grep -E '\\\\.(tsx?|js)\\$' || true)\\n\\nif [ -n \\\"\\$STAGED_JS_FILES\\\" ]; then\\n echo \\\"\\$STAGED_JS_FILES\\\" | xargs npx prettier --write --ignore-unknown || exit 1\\n echo \\\"\\$STAGED_JS_FILES\\\" | xargs npx eslint --fix || exit 1\\n echo \\\"\\$STAGED_JS_FILES\\\" | xargs git add\\nfi\" > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit",
15
15
  "_itDoesNotWork": "echo '\\n🔍 Troubleshooting the react project...\\n' && echo '\\n📦 Step 1: Installing Node dependencies\\n' && npm install --silent && echo '✅ Node dependencies installed successfully!' && echo '\\n🔄 Step 2: Checking if Vite dev server is running\\n' && (pgrep -f \"vite\" > /dev/null && echo '✅ Vite dev server is running') || echo '❌ Vite dev server is not running. Start it with: npm run dev' && echo '\\n✅ Basic troubleshooting complete. If issues persist, please ask for help.'",
16
- "itDoesNotWork": "npm run _itDoesNotWork --silent"
16
+ "itDoesNotWork": "npm run _itDoesNotWork --silent",
17
+ "test:e2e": "cd e2e && playwright test",
18
+ "test:e2e:ui": "cd e2e && playwright test --ui",
19
+ "test:e2e:report": "cd e2e && allure generate ./allure-results --clean && allure open"
17
20
  },
18
21
  "dependencies": {
19
22
  "react": "19.2.0",
20
23
  "react-dom": "19.2.0",
21
24
  "react-icons": "5.5.0",
22
- "wouter": "3.7.1"
25
+ "wouter": "3.8.0"
23
26
  },
24
27
  "devDependencies": {
25
28
  "@eslint/js": "9.39.1",
26
29
  "@tailwindcss/vite": "4.1.17",
27
- "@types/react": "19.2.5",
30
+ "@types/react": "19.2.7",
28
31
  "@types/react-dom": "19.2.3",
29
32
  "@vitejs/plugin-react": "5.1.1",
30
33
  "eslint": "9.39.1",
@@ -41,7 +44,7 @@
41
44
  "prettier-plugin-tailwindcss": "0.7.1",
42
45
  "tailwindcss": "4.1.17",
43
46
  "typescript": "5.9.3",
44
- "typescript-eslint": "8.46.4",
45
- "vite": "7.2.2"
47
+ "typescript-eslint": "8.48.0",
48
+ "vite": "7.2.4"
46
49
  }
47
50
  }