create-bdpa-react-scaffold 2.0.6 → 2.0.7

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.
Files changed (2) hide show
  1. package/create-ui-lib.js +21 -0
  2. package/package.json +1 -1
package/create-ui-lib.js CHANGED
@@ -1809,4 +1809,25 @@ if (!doInstall) {
1809
1809
  console.log("\nℹ️ Skipping npm install (flag --no-install). Run manually later.");
1810
1810
  }
1811
1811
 
1812
+ // cd into app directory, npm install, then npm run dev
1813
+ const isWin = process.platform === "win32";
1814
+ const npmCmd = isWin ? "npm.cmd" : "npm";
1815
+
1816
+ console.log(`\n📂 Changing into project directory: ${BASE_DIR}`);
1817
+ process.chdir(BASE_DIR);
1818
+
1819
+ console.log("\n📦 Running npm install...");
1820
+ const installResult = spawnSync(npmCmd, ["install"], { stdio: "inherit", cwd: BASE_DIR });
1821
+ if (installResult.status !== 0) {
1822
+ console.error(`\n❌ npm install failed with status ${installResult.status}.`);
1823
+ process.exit(installResult.status || 1);
1824
+ }
1825
+
1826
+ console.log("\n🚀 Starting dev server with npm run dev...");
1827
+ const devResult = spawnSync(npmCmd, ["run", "dev"], { stdio: "inherit", cwd: BASE_DIR });
1828
+ if (devResult.status !== 0) {
1829
+ console.error(`\n❌ npm run dev failed with status ${devResult.status}.`);
1830
+ process.exit(devResult.status || 1);
1831
+ }
1832
+
1812
1833
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bdpa-react-scaffold",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Scaffold a React + Tailwind + shadcn/ui component demo via Vite.",
5
5
  "bin": {
6
6
  "create-bdpa-react-scaffold": "create-ui-lib.js"