stranger-quarkdown 4.0.0-alpha.4 → 4.0.0

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/bin/squarkdown CHANGED
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import * as path from "node:path";
4
- import { platform } from "node:process";
5
4
  import { spawn } from "node:child_process";
5
+ import { chmodSync } from "node:fs";
6
+ import { platform } from "node:process";
6
7
  import { fileURLToPath } from "node:url";
7
8
 
8
9
 
@@ -12,13 +13,18 @@ switch (platform) {
12
13
  case "linux": bin = "squarkdown-linux"; break;
13
14
  case "win32": bin = "squarkdown-win.exe"; break;
14
15
  default:
15
- console.error("Squarkdown only supports 'win32' and 'linux', sorry =(");
16
+ console.error("Squarkdown currently only supports 'win32' and 'linux' (when installed from NPM), sorry =(");
16
17
  process.exit(1);
17
18
  }
18
19
 
19
20
  let folder = path.dirname(fileURLToPath(import.meta.url));
21
+ let executable = `${folder}/${bin}`;
22
+
23
+ if (platform === "linux") {
24
+ chmodSync(executable, 0o755);
25
+ }
20
26
 
21
- let squarkup = spawn(`${folder}/${bin}`, process.argv.slice(2), {
27
+ let squarkup = spawn(executable, process.argv.slice(2), {
22
28
  stdio: "inherit",
23
29
  });
24
30
 
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stranger-quarkdown",
3
3
  "author": "Sup#2.0",
4
- "version": "4.0.0-alpha.4",
4
+ "version": "4.0.0",
5
5
  "license": "MIT",
6
6
 
7
7
  "description": "Markdown preprocessing for SvelteKit projects",