@gtkx/cli 0.2.2 → 0.2.3

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/dist/create.js +14 -6
  2. package/package.json +3 -3
package/dist/create.js CHANGED
@@ -12,11 +12,11 @@ const TESTING_DEV_DEPENDENCIES = {
12
12
  const getTestScript = (testing) => {
13
13
  switch (testing) {
14
14
  case "vitest":
15
- return "vitest";
15
+ return "GDK_BACKEND=x11 xvfb-run -a vitest";
16
16
  case "jest":
17
- return "jest";
17
+ return "GDK_BACKEND=x11 xvfb-run -a jest";
18
18
  case "node":
19
- return "node --import tsx --test tests/**/*.test.ts";
19
+ return "GDK_BACKEND=x11 xvfb-run -a node --import tsx --test tests/**/*.test.ts";
20
20
  case "none":
21
21
  return undefined;
22
22
  }
@@ -116,7 +116,7 @@ ${afterEachFn}(async () => {
116
116
 
117
117
  describe("App", () => {
118
118
  it("renders the increment button", async () => {
119
- await render(<App />);
119
+ await render(<App />, { wrapper: false });
120
120
  const button = await screen.findByRole("button", { name: "Increment" });
121
121
  ${assertion}
122
122
  });
@@ -323,6 +323,14 @@ export const createApp = async (options = {}) => {
323
323
  p.log.info(` ${getAddCommand(packageManager, devDeps, true)}`);
324
324
  }
325
325
  const runCmd = getRunCommand(packageManager);
326
- p.note(`cd ${name}\n${runCmd}`, "Next steps");
327
- p.outro("Happy hacking!");
326
+ const nextSteps = `cd ${name}
327
+ ${runCmd}`;
328
+ const testingNote = testing !== "none"
329
+ ? `
330
+
331
+ To run tests, you need xvfb installed:
332
+ Fedora: sudo dnf install xorg-x11-server-Xvfb
333
+ Ubuntu: sudo apt install xvfb`
334
+ : "";
335
+ p.note(`${nextSteps}${testingNote}`, "Next steps");
328
336
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtkx/cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
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.2",
51
- "@gtkx/react": "0.2.2"
50
+ "@gtkx/ffi": "0.2.3",
51
+ "@gtkx/react": "0.2.3"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^19"