ssqch 0.7.1 → 0.8.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/README.md +6 -4
- package/bin/ssqch.js +14 -48
- package/bundled/README.md +1247 -0
- package/bundled/completions/bash +840 -0
- package/bundled/completions/elvish +286 -0
- package/bundled/completions/fish +182 -0
- package/bundled/completions/powershell +318 -0
- package/bundled/completions/zsh +510 -0
- package/bundled/ssqch.d.ts +532 -0
- package/bundled/starter/engines/index.edge +11 -0
- package/bundled/starter/engines/index.ejs +11 -0
- package/bundled/starter/engines/index.hbs +11 -0
- package/bundled/starter/engines/index.liquid +11 -0
- package/bundled/starter/engines/layout.edge +35 -0
- package/bundled/starter/engines/layout.ejs +35 -0
- package/bundled/starter/engines/layout.hbs +35 -0
- package/bundled/starter/engines/layout.liquid +35 -0
- package/bundled/starter/gitignore +3 -0
- package/bundled/starter/jsconfig.json +11 -0
- package/bundled/starter/src/404.md +8 -0
- package/bundled/starter/src/_blueprints/posts.md +5 -0
- package/bundled/starter/src/_data/site.json +4 -0
- package/bundled/starter/src/_includes/layout.jinja +35 -0
- package/bundled/starter/src/index.jinja +11 -0
- package/bundled/starter/src/posts/i-know-what-i-saw.md +11 -0
- package/bundled/starter/src/posts/posts.json +4 -0
- package/bundled/starter/src/posts/raiders-of-the-lost-path.md +27 -0
- package/bundled/starter/src/posts/the-cache-of-the-wild.md +26 -0
- package/bundled/starter/src/posts/the-stump-has-moved.md +15 -0
- package/bundled/starter/src/posts/upon-further-review-a-stump.md +18 -0
- package/bundled/starter/ssqch.config.js +29 -0
- package/bundled/starter-docs/engines/edge/base.edge +41 -0
- package/bundled/starter-docs/engines/edge/containers/details.edge +5 -0
- package/bundled/starter-docs/engines/edge/containers/tab.edge +4 -0
- package/bundled/starter-docs/engines/edge/containers/tabs.edge +5 -0
- package/bundled/starter-docs/engines/edge/doc.edge +59 -0
- package/bundled/starter-docs/engines/edge/hooks/heading.edge +2 -0
- package/bundled/starter-docs/engines/ejs/base.ejs +41 -0
- package/bundled/starter-docs/engines/ejs/containers/details.ejs +5 -0
- package/bundled/starter-docs/engines/ejs/containers/tab.ejs +4 -0
- package/bundled/starter-docs/engines/ejs/containers/tabs.ejs +5 -0
- package/bundled/starter-docs/engines/ejs/doc.ejs +59 -0
- package/bundled/starter-docs/engines/ejs/hooks/heading.ejs +2 -0
- package/bundled/starter-docs/engines/hbs/base.hbs +41 -0
- package/bundled/starter-docs/engines/hbs/containers/details.hbs +5 -0
- package/bundled/starter-docs/engines/hbs/containers/tab.hbs +4 -0
- package/bundled/starter-docs/engines/hbs/containers/tabs.hbs +5 -0
- package/bundled/starter-docs/engines/hbs/doc.hbs +58 -0
- package/bundled/starter-docs/engines/hbs/hooks/heading.hbs +2 -0
- package/bundled/starter-docs/engines/liquid/base.liquid +41 -0
- package/bundled/starter-docs/engines/liquid/containers/details.liquid +5 -0
- package/bundled/starter-docs/engines/liquid/containers/tab.liquid +4 -0
- package/bundled/starter-docs/engines/liquid/containers/tabs.liquid +5 -0
- package/bundled/starter-docs/engines/liquid/doc.liquid +60 -0
- package/bundled/starter-docs/engines/liquid/hooks/heading.liquid +2 -0
- package/bundled/starter-docs/gitignore +4 -0
- package/bundled/starter-docs/src/404.md +12 -0
- package/bundled/starter-docs/src/_blueprints/docs.md +5 -0
- package/bundled/starter-docs/src/_data/nav.yml +10 -0
- package/bundled/starter-docs/src/_data/site.json +5 -0
- package/bundled/starter-docs/src/_includes/base.jinja +41 -0
- package/bundled/starter-docs/src/_includes/containers/details.jinja +5 -0
- package/bundled/starter-docs/src/_includes/containers/tab.jinja +4 -0
- package/bundled/starter-docs/src/_includes/containers/tabs.jinja +5 -0
- package/bundled/starter-docs/src/_includes/doc.jinja +59 -0
- package/bundled/starter-docs/src/_includes/hooks/heading.jinja +2 -0
- package/bundled/starter-docs/src/assets/docs.css +257 -0
- package/bundled/starter-docs/src/assets/docs.js +67 -0
- package/bundled/starter-docs/src/docs/docs.json +1 -0
- package/bundled/starter-docs/src/docs/guides/deploying.md +77 -0
- package/bundled/starter-docs/src/docs/guides/writing.md +65 -0
- package/bundled/starter-docs/src/docs/index.md +29 -0
- package/bundled/starter-docs/src/docs/install.md +42 -0
- package/bundled/starter-docs/src/index.md +13 -0
- package/bundled/starter-docs/ssqch.config.js +40 -0
- package/bundled/trailheads/from-component-frameworks.md +116 -0
- package/bundled/trailheads/from-docusaurus.md +55 -0
- package/bundled/trailheads/from-eleventy.md +140 -0
- package/bundled/trailheads/from-hexo.md +92 -0
- package/bundled/trailheads/from-mkdocs.md +45 -0
- package/bundled/trailheads/from-zola.md +71 -0
- package/lib/assets.js +235 -3
- package/lib/chunk-37KSIVNY.js +29 -0
- package/lib/chunk-3GYLOC6Y.js +1017 -0
- package/lib/chunk-3NYSSA2C.js +22 -0
- package/lib/chunk-3PHCFZEU.js +209 -0
- package/lib/chunk-4Q6WMTER.js +32 -0
- package/lib/chunk-6XYSFG6V.js +4423 -0
- package/lib/chunk-6XYSFG6V.js.LEGAL.txt +41 -0
- package/lib/chunk-AD3HAW3W.js +10 -0
- package/lib/chunk-AMBFWPZ4.js +118 -0
- package/lib/chunk-BOBPVAX2.js +37088 -0
- package/lib/chunk-BOBPVAX2.js.LEGAL.txt +27 -0
- package/lib/chunk-BRK4MXXO.js +565 -0
- package/lib/chunk-C35KIPAR.js +247 -0
- package/lib/chunk-CDEPYU7W.js +25 -0
- package/lib/chunk-CMUWRPSQ.js +113 -0
- package/lib/chunk-DDV6JEC2.js +46 -0
- package/lib/chunk-DHHQKW4F.js +71 -0
- package/lib/chunk-EIT4ZDT4.js +1485 -0
- package/lib/chunk-EZZUUPI4.js +20 -0
- package/lib/chunk-F65YUXZ7.js +334 -0
- package/lib/chunk-FVZ5JBRI.js +115 -0
- package/lib/chunk-FYGE634X.js +44 -0
- package/lib/chunk-GOE4ZSAB.js +75 -0
- package/lib/chunk-GSKVRAHF.js +44 -0
- package/lib/chunk-HR2RU2LY.js +999 -0
- package/lib/chunk-HXCLCXRT.js +20 -0
- package/lib/chunk-I3PS26CI.js +48 -0
- package/lib/chunk-IAFM5ITE.js +11 -0
- package/lib/chunk-IRHRK7XB.js +54 -0
- package/lib/chunk-JRT7TQQP.js +57 -0
- package/lib/chunk-JSPSMIJ2.js +217 -0
- package/lib/chunk-KBGE5MCY.js +175 -0
- package/lib/chunk-N5QTGQ5N.js +207 -0
- package/lib/chunk-NKXEPHRZ.js +136 -0
- package/lib/chunk-NUKCUDC4.js +146 -0
- package/lib/chunk-RI2L3VGO.js +376 -0
- package/lib/chunk-TDGBQNGW.js +251 -0
- package/lib/chunk-TN6EEDX2.js +3935 -0
- package/lib/chunk-TWCVHOKO.js +1229 -0
- package/lib/chunk-UGEGUUBT.js +29 -0
- package/lib/chunk-UU43WIZG.js +29 -0
- package/lib/chunk-VJWQSYEG.js +119 -0
- package/lib/chunk-VVPZ5PDP.js +160 -0
- package/lib/chunk-WMOVCQO6.js +1287 -0
- package/lib/chunk-WP3RPVUM.js +211 -0
- package/lib/chunk-YSH2NMIE.js +502 -0
- package/lib/cli.js +540 -0
- package/lib/elements.js +180 -3
- package/lib/image.js +27 -3
- package/lib/links.js +464 -3
- package/lib/minify.js +69 -3
- package/lib/redirects.js +152 -3
- package/lib/rss.js +139 -3
- package/lib/sass.js +221 -3
- package/lib/sitemap.js +88 -3
- package/lib/ssqch.js +28 -0
- package/package.json +83 -80
- package/src/serve/live.js +174 -0
- package/src/serve/not-found.html +31 -0
- package/types/globals.d.ts +3 -2
- package/types/image.d.ts +7 -3
- package/types/index.d.ts +18 -5
- package/types/links.d.ts +1 -1
- package/types/minify.d.ts +1 -1
- package/types/rss.d.ts +1 -1
- package/types/sass.d.ts +1 -1
- package/wasm/markdown.wasm +0 -0
- package/wasm/minify.wasm +0 -0
- package/wasm/sass.wasm +0 -0
- package/lib/index.js +0 -3
- package/platforms.json +0 -6
package/README.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# ssqch
|
|
2
2
|
|
|
3
|
-
[SiteSquatch](https://github.com/reverentgeek/sitesquatch) is a fast static site generator,
|
|
3
|
+
[SiteSquatch](https://github.com/reverentgeek/sitesquatch) is a fast static site generator, configured with JavaScript (`ssqch.config.js`). It runs on Node.js 22.18 or newer. Install it in a site as a dev dependency, so the lockfile pins the version:
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npm install --save-dev ssqch
|
|
7
7
|
npx ssqch build
|
|
8
8
|
```
|
|
9
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"`.
|
|
10
|
+
Or with pnpm (`pnpm add -D ssqch`, `pnpm ssqch build`) or yarn. In `package.json` scripts, call it by name: `"build": "ssqch build"`. `npx ssqch init` starts a new site.
|
|
11
11
|
|
|
12
|
-
The
|
|
12
|
+
The package is JavaScript, with its template and Markdown libraries bundled in, and its Markdown, highlighter, minifier and Sass as WebAssembly, so it's the same on every platform. Installing it brings one other package: [sharp](https://sharp.pixelplumbing.com), which encodes images.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The modules a config imports (`ssqch`, `ssqch/image` and the rest) are in the package's `exports` map, with their types, so editors, TypeScript and ESLint's `n/no-missing-import` find them.
|
|
15
|
+
|
|
16
|
+
Outside a site, `npm install --global ssqch` puts `ssqch` on your `PATH`, and Homebrew (`brew install reverentgeek/tap/ssqch`) installs this package with Homebrew's own Node. See the [README](https://github.com/reverentgeek/sitesquatch#readme) for everything else.
|
package/bin/ssqch.js
CHANGED
|
@@ -1,50 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// dependency limited to its `os` and `cpu`, so only the matching one installs).
|
|
5
|
-
"use strict";
|
|
2
|
+
import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
3
|
+
const require = __ssqchCreateRequire(import.meta.url);
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
});
|
|
5
|
+
// bin/ssqch.ts
|
|
6
|
+
import module from "node:module";
|
|
7
|
+
import os from "node:os";
|
|
8
|
+
process.env.UV_THREADPOOL_SIZE ??= String(os.availableParallelism() + 4);
|
|
9
|
+
module.enableCompileCache?.();
|
|
10
|
+
var { main, crashed } = await import("../lib/cli.js");
|
|
11
|
+
process.on("uncaughtException", crashed);
|
|
12
|
+
process.on("unhandledRejection", crashed);
|
|
13
|
+
var code = await main(process.argv.slice(2));
|
|
14
|
+
process.exitCode = code;
|
|
15
|
+
await Promise.all([process.stdout, process.stderr].map((stream) => new Promise((resolve) => stream.write("", resolve))));
|
|
16
|
+
process.exit(code);
|