revine 0.3.3 → 0.3.5

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.
@@ -2,7 +2,7 @@ import path from "path";
2
2
  import { fileURLToPath } from "url";
3
3
  import { updatePackageJson } from "../config/package.js";
4
4
  import { updateReadme } from "../config/readme.js";
5
- import { installDependencies } from "../installers/dependencies.js";
5
+ import { installDependencies } from "../setup/dependencies.js";
6
6
  import { askForTailwindSetup } from "../prompts/tailwind.js";
7
7
  import { setupTailwind } from "../setup/tailwind.js";
8
8
  import { copyTemplate } from "../utils/file.js";
@@ -0,0 +1,15 @@
1
+ import { spawnSync } from "child_process";
2
+ import { logError, logInfo } from "../utils/logger.js";
3
+ export async function installDependencies(projectDir) {
4
+ const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
5
+ const installResult = spawnSync(npmCmd, ["install"], {
6
+ stdio: "inherit",
7
+ cwd: projectDir,
8
+ shell: true,
9
+ });
10
+ if (installResult.error || installResult.status !== 0) {
11
+ logError("Error installing dependencies:", installResult.error);
12
+ logInfo("Try running manually: npm install");
13
+ process.exit(1);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revine",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "A react framework, but better.",
5
5
  "license": "ISC",
6
6
  "author": "Rachit Bharadwaj",
@@ -2,7 +2,7 @@ import path from "path";
2
2
  import { fileURLToPath } from "url";
3
3
  import { updatePackageJson } from "../config/package.js";
4
4
  import { updateReadme } from "../config/readme.js";
5
- import { installDependencies } from "../installers/dependencies.js";
5
+ import { installDependencies } from "../setup/dependencies.js";
6
6
  import { askForTailwindSetup } from "../prompts/tailwind.js";
7
7
  import { setupTailwind } from "../setup/tailwind.js";
8
8
  import { copyTemplate } from "../utils/file.js";
@@ -1,8 +1,9 @@
1
1
  import react from "@vitejs/plugin-react";
2
2
  import { revineLoggerPlugin } from "../viteLoggerPlugin";
3
+ import tailwindcss from "@tailwindcss/vite";
3
4
 
4
5
  export const defaultViteConfig = {
5
- plugins: [react(), revineLoggerPlugin()],
6
+ plugins: [react(), revineLoggerPlugin(), tailwindcss()],
6
7
  logLevel: "silent",
7
8
 
8
9
  server: {
File without changes