Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

fix: exclude local Tauri state from npm packages

Tw93bb82dd5c8da3
diff --git a/src-tauri/.npmignore b/src-tauri/.npmignore
new file mode 100644
index 00000000..69e1d878
--- /dev/null
+++ b/src-tauri/.npmignore
@@ -0,0 +1,3 @@
+.pake/
+target/
+.cargo/config.toml
diff --git a/tests/integration/workflow-paths.test.js b/tests/integration/workflow-paths.test.js
index c4f906b9..953d2105 100644
--- a/tests/integration/workflow-paths.test.js
+++ b/tests/integration/workflow-paths.test.js
@@ -266,4 +266,18 @@ describe("Workflow path integration", () => {
expect(parts.length).toBeGreaterThan(1);
});
});
+
+ describe("npm package boundaries", () => {
+ it("excludes generated Tauri build state from the shipped template", () => {
+ const ignoredPaths = fs
+ .readFileSync("src-tauri/.npmignore", "utf8")
+ .split(/\r?\n/)
+ .map((line) => line.trim())
+ .filter((line) => line && !line.startsWith("#"));
+
+ expect(ignoredPaths).toEqual(
+ expect.arrayContaining([".pake/", "target/", ".cargo/config.toml"]),
+ );
+ });
+ });
});