@gtkx/cli 0.2.0 → 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/dist/create.js CHANGED
@@ -291,7 +291,8 @@ export const createApp = async (options = {}) => {
291
291
  writeFileSync(join(projectPath, "tests", "app.test.tsx"), generateExampleTest(testing));
292
292
  }
293
293
  s.stop("Project structure created!");
294
- s.start("Installing dependencies...");
294
+ const installSpinner = p.spinner();
295
+ installSpinner.start("Installing dependencies...");
295
296
  const devDeps = [...DEV_DEPENDENCIES];
296
297
  if (testing !== "none") {
297
298
  devDeps.push(...TESTING_DEV_DEPENDENCIES[testing]);
@@ -304,10 +305,10 @@ export const createApp = async (options = {}) => {
304
305
  execSync(addCmd, { cwd: projectPath, stdio: "pipe" });
305
306
  const addDevCmd = getAddCommand(packageManager, devDeps, true);
306
307
  execSync(addDevCmd, { cwd: projectPath, stdio: "pipe" });
307
- s.stop("Dependencies installed!");
308
+ installSpinner.stop("Dependencies installed!");
308
309
  }
309
310
  catch (error) {
310
- s.stop("Failed to install dependencies");
311
+ installSpinner.stop("Failed to install dependencies");
311
312
  p.log.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
312
313
  p.log.info("You can install dependencies manually by running:");
313
314
  p.log.info(` cd ${name}`);
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { events } from "@gtkx/ffi";
2
3
  import { update } from "@gtkx/react";
3
4
  import react from "@vitejs/plugin-react";
4
5
  import { createServer } from "vite";
@@ -33,6 +34,9 @@ export const createDevServer = async (options) => {
33
34
  server.moduleGraph.invalidateModule(module);
34
35
  }
35
36
  };
37
+ events.on("stop", () => {
38
+ server.close();
39
+ });
36
40
  server.watcher.on("change", async (changedPath) => {
37
41
  console.log(`[gtkx] File changed: ${changedPath}`);
38
42
  invalidateAllModules();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtkx/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI for GTKX - create and develop GTK4 React applications",
5
5
  "license": "MPL-2.0",
6
6
  "author": "Eugenio Depalo <eugeniodepalo@gmail.com>",
@@ -47,8 +47,8 @@
47
47
  "@vitejs/plugin-react": "5.1.2",
48
48
  "citty": "0.1.6",
49
49
  "vite": "7.2.7",
50
- "@gtkx/ffi": "0.2.0",
51
- "@gtkx/react": "0.2.0"
50
+ "@gtkx/ffi": "0.2.1",
51
+ "@gtkx/react": "0.2.1"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^19"