ssqch 0.0.0-stage → 0.5.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 David Neal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,14 @@
1
- # Temporary Holding Version
1
+ # ssqch
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [SiteSquatch](https://github.com/reverentgeek/sitesquatch) is a fast static site generator, written in Rust and configured with JavaScript (`ssqch.config.js`). This package installs the prebuilt `ssqch` binary for your platform, so a site can pin it as a dev dependency:
4
+
5
+ ```sh
6
+ npm install --save-dev ssqch
7
+ npx ssqch build
8
+ ```
9
+
10
+ Or with pnpm (`pnpm add -D ssqch`, `pnpm ssqch build`) or yarn. In `package.json` scripts, call it by name: `"build": "ssqch build"`.
11
+
12
+ The binary comes from an optional dependency for your platform (`@ssqch/darwin-arm64`, `@ssqch/darwin-x64`, `@ssqch/linux-x64` or `@ssqch/win32-x64`). Installing runs no scripts and downloads nothing beyond the packages. The Linux binary is statically linked, so it runs on any distribution, Alpine included. On other platforms, install from source with `cargo install ssqch --locked`.
13
+
14
+ See the [README](https://github.com/reverentgeek/sitesquatch#readme) for everything else, including the other ways to install it.
package/bin/ssqch.js ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ // Runs the ssqch binary from the platform package that npm, pnpm or yarn
3
+ // installed next to this one (`@ssqch/<platform>-<arch>`, an optional
4
+ // dependency limited to its `os` and `cpu`, so only the matching one installs).
5
+ "use strict";
6
+
7
+ const { spawn } = require("node:child_process");
8
+ const platforms = require("../platforms.json");
9
+
10
+ const key = `${process.platform}-${process.arch}`;
11
+ const exe = process.platform === "win32" ? "ssqch.exe" : "ssqch";
12
+
13
+ function fail(message) {
14
+ process.stderr.write(`ssqch: ${message}\n`);
15
+ process.exit(1);
16
+ }
17
+
18
+ function findBinary() {
19
+ if (!platforms[key]) {
20
+ fail(`no prebuilt binary for ${key}. The npm package covers ${Object.keys(platforms).join(", ")}. Build it from source with \`cargo install ssqch --locked\`; see https://github.com/reverentgeek/sitesquatch#install`);
21
+ }
22
+ const pkg = `@ssqch/${key}`;
23
+ try {
24
+ return require.resolve(`${pkg}/bin/${exe}`);
25
+ } catch {
26
+ const { version } = require("../package.json");
27
+ fail(`${pkg} isn't installed, so there's no binary to run. It's an optional dependency of ssqch, and npm skips one it can't download: check that ${pkg}@${version} is on the registry, and reinstall without \`--no-optional\` or \`--omit=optional\` (with a lockfile made on another platform, run the install again here). Tracks lead here, but nobody's home.`);
28
+ }
29
+ }
30
+
31
+ const binary = findBinary();
32
+ const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
33
+
34
+ // A terminal's Ctrl-C reaches both processes, but a process manager (concurrently,
35
+ // a container, CI) signals only this one: pass it on, so `ssqch serve` stops too.
36
+ const forwarded = ["SIGINT", "SIGTERM", "SIGHUP"];
37
+ for (const signal of forwarded) {
38
+ process.on(signal, () => child.kill(signal));
39
+ }
40
+
41
+ child.on("error", (error) => fail(`couldn't run ${binary}: ${error.message}`));
42
+ child.on("exit", (code, signal) => {
43
+ if (signal) {
44
+ // Exit the way the binary did.
45
+ for (const s of forwarded) process.removeAllListeners(s);
46
+ process.kill(process.pid, signal);
47
+ return;
48
+ }
49
+ process.exit(code ?? 1);
50
+ });
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "ssqch",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "description": "SiteSquatch, a fast static site generator configured with JavaScript",
4
+ "version": "0.5.2",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/reverentgeek/sitesquatch#readme",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/reverentgeek/sitesquatch.git"
10
+ },
11
+ "bugs": "https://github.com/reverentgeek/sitesquatch/issues",
12
+ "keywords": [
13
+ "static site generator",
14
+ "ssg",
15
+ "blog",
16
+ "markdown",
17
+ "jinja",
18
+ "liquid"
19
+ ],
20
+ "bin": {
21
+ "ssqch": "bin/ssqch.js"
22
+ },
23
+ "files": [
24
+ "bin",
25
+ "platforms.json"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "optionalDependencies": {
31
+ "@ssqch/darwin-arm64": "0.5.2",
32
+ "@ssqch/darwin-x64": "0.5.2",
33
+ "@ssqch/linux-x64": "0.5.2",
34
+ "@ssqch/win32-x64": "0.5.2"
35
+ }
36
+ }
package/platforms.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "darwin-arm64": { "target": "aarch64-apple-darwin", "archive": "tar.gz", "os": "darwin", "cpu": "arm64" },
3
+ "darwin-x64": { "target": "x86_64-apple-darwin", "archive": "tar.gz", "os": "darwin", "cpu": "x64" },
4
+ "linux-x64": { "target": "x86_64-unknown-linux-musl", "archive": "tar.gz", "os": "linux", "cpu": "x64" },
5
+ "win32-x64": { "target": "x86_64-pc-windows-msvc", "archive": "zip", "os": "win32", "cpu": "x64" }
6
+ }