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
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
2
|
+
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
red
|
|
5
|
+
} from "./chunk-6XYSFG6V.js";
|
|
6
|
+
import {
|
|
7
|
+
joinAsGiven,
|
|
8
|
+
parentAsGiven,
|
|
9
|
+
slashes
|
|
10
|
+
} from "./chunk-VJWQSYEG.js";
|
|
11
|
+
|
|
12
|
+
// src/commands/init.ts
|
|
13
|
+
import fs2 from "node:fs";
|
|
14
|
+
import path2 from "node:path";
|
|
15
|
+
|
|
16
|
+
// src/bundled.ts
|
|
17
|
+
import fs from "node:fs";
|
|
18
|
+
import path from "node:path";
|
|
19
|
+
import { fileURLToPath } from "node:url";
|
|
20
|
+
var PACKAGE = path.dirname(path.dirname(fileURLToPath(new URL("../src/bundled.ts", import.meta.url).href)));
|
|
21
|
+
var BUNDLED = path.join(PACKAGE, "bundled");
|
|
22
|
+
var FROM_REPOSITORY = [
|
|
23
|
+
["README.md", "README.md"],
|
|
24
|
+
["trailheads", "docs/trailheads"]
|
|
25
|
+
];
|
|
26
|
+
function bundledPath(rel) {
|
|
27
|
+
const inPackage = path.join(BUNDLED, rel);
|
|
28
|
+
if (fs.existsSync(inPackage)) return inPackage;
|
|
29
|
+
for (const [prefix, original] of FROM_REPOSITORY) {
|
|
30
|
+
if (rel === prefix || rel.startsWith(`${prefix}/`)) return path.join(PACKAGE, "../..", original + rel.slice(prefix.length));
|
|
31
|
+
}
|
|
32
|
+
return inPackage;
|
|
33
|
+
}
|
|
34
|
+
var cache = /* @__PURE__ */ new Map();
|
|
35
|
+
function bundled(rel) {
|
|
36
|
+
let text = cache.get(rel);
|
|
37
|
+
if (text === void 0) cache.set(rel, text = fs.readFileSync(bundledPath(rel), "utf8"));
|
|
38
|
+
return text;
|
|
39
|
+
}
|
|
40
|
+
function bundledNames(rel) {
|
|
41
|
+
return fs.readdirSync(bundledPath(rel)).sort();
|
|
42
|
+
}
|
|
43
|
+
var types = () => bundled("ssqch.d.ts");
|
|
44
|
+
|
|
45
|
+
// src/commands/init.ts
|
|
46
|
+
var STARTER = [
|
|
47
|
+
["ssqch.config.js", "starter/ssqch.config.js"],
|
|
48
|
+
["src/_data/site.json", "starter/src/_data/site.json"],
|
|
49
|
+
["src/posts/posts.json", "starter/src/posts/posts.json"],
|
|
50
|
+
["src/posts/i-know-what-i-saw.md", "starter/src/posts/i-know-what-i-saw.md"],
|
|
51
|
+
["src/posts/upon-further-review-a-stump.md", "starter/src/posts/upon-further-review-a-stump.md"],
|
|
52
|
+
["src/posts/the-stump-has-moved.md", "starter/src/posts/the-stump-has-moved.md"],
|
|
53
|
+
["src/posts/raiders-of-the-lost-path.md", "starter/src/posts/raiders-of-the-lost-path.md"],
|
|
54
|
+
["src/posts/the-cache-of-the-wild.md", "starter/src/posts/the-cache-of-the-wild.md"],
|
|
55
|
+
["src/404.md", "starter/src/404.md"],
|
|
56
|
+
["src/_blueprints/posts.md", "starter/src/_blueprints/posts.md"],
|
|
57
|
+
["ssqch.d.ts", "ssqch.d.ts"],
|
|
58
|
+
["jsconfig.json", "starter/jsconfig.json"],
|
|
59
|
+
[".gitignore", "starter/gitignore"]
|
|
60
|
+
];
|
|
61
|
+
var DOCS_STARTER = [
|
|
62
|
+
["ssqch.config.js", "starter-docs/ssqch.config.js"],
|
|
63
|
+
["src/_data/site.json", "starter-docs/src/_data/site.json"],
|
|
64
|
+
["src/_data/nav.yml", "starter-docs/src/_data/nav.yml"],
|
|
65
|
+
["src/assets/docs.css", "starter-docs/src/assets/docs.css"],
|
|
66
|
+
["src/assets/docs.js", "starter-docs/src/assets/docs.js"],
|
|
67
|
+
["src/index.md", "starter-docs/src/index.md"],
|
|
68
|
+
["src/404.md", "starter-docs/src/404.md"],
|
|
69
|
+
["src/docs/docs.json", "starter-docs/src/docs/docs.json"],
|
|
70
|
+
["src/docs/index.md", "starter-docs/src/docs/index.md"],
|
|
71
|
+
["src/docs/install.md", "starter-docs/src/docs/install.md"],
|
|
72
|
+
["src/docs/guides/writing.md", "starter-docs/src/docs/guides/writing.md"],
|
|
73
|
+
["src/docs/guides/deploying.md", "starter-docs/src/docs/guides/deploying.md"],
|
|
74
|
+
["src/_blueprints/docs.md", "starter-docs/src/_blueprints/docs.md"],
|
|
75
|
+
["ssqch.d.ts", "ssqch.d.ts"],
|
|
76
|
+
["jsconfig.json", "starter/jsconfig.json"],
|
|
77
|
+
[".gitignore", "starter-docs/gitignore"]
|
|
78
|
+
];
|
|
79
|
+
var STARTERS = ["site", "docs"];
|
|
80
|
+
var ENGINES = ["jinja", "njk", "edge", "liquid", "hbs", "ejs"];
|
|
81
|
+
var DEFAULT_ENGINE = "jinja";
|
|
82
|
+
var starterEngines = () => [...ENGINES];
|
|
83
|
+
var SITE_TEMPLATES = {
|
|
84
|
+
jinja: [["src/_includes/layout", "starter/src/_includes/layout.jinja"], ["src/index", "starter/src/index.jinja"]],
|
|
85
|
+
...Object.fromEntries(["edge", "liquid", "hbs", "ejs"].map((e) => [e, [["src/_includes/layout", `starter/engines/layout.${e}`], ["src/index", `starter/engines/index.${e}`]]]))
|
|
86
|
+
};
|
|
87
|
+
var DOCS_NAMES = ["base", "doc", "hooks/heading", "containers/tabs", "containers/tab", "containers/details"];
|
|
88
|
+
var docsTemplates = (dir, ext) => DOCS_NAMES.map((name) => [`src/_includes/${name}`, `${dir}${name}.${ext}`]);
|
|
89
|
+
var DOCS_TEMPLATES = {
|
|
90
|
+
jinja: docsTemplates("starter-docs/src/_includes/", "jinja"),
|
|
91
|
+
...Object.fromEntries(["edge", "liquid", "hbs", "ejs"].map((e) => [e, docsTemplates(`starter-docs/engines/${e}/`, e)]))
|
|
92
|
+
};
|
|
93
|
+
function replaceOnce(contents, from, to) {
|
|
94
|
+
const at = contents.indexOf(from);
|
|
95
|
+
if (at === -1) throw new Error(`starter file is missing ${JSON.stringify(from)}`);
|
|
96
|
+
return contents.slice(0, at) + to + contents.slice(at + from.length);
|
|
97
|
+
}
|
|
98
|
+
var rename = (engine, contents) => engine === "jinja" ? contents : contents.replace(/\b([\w-]+)\.jinja\b/g, (_, name) => `${name}.${engine}`);
|
|
99
|
+
function adapt(engine, rel, contents) {
|
|
100
|
+
if (engine === "jinja") return contents;
|
|
101
|
+
if (rel === "ssqch.config.js") {
|
|
102
|
+
let config = replaceOnce(contents, 'templateFormats: ["jinja", "md"],', `templateFormats: ["${engine}", "md"],
|
|
103
|
+
markdownEngine: "${engine}",`);
|
|
104
|
+
if (config.includes("{{ readableDate(post.date) }}")) {
|
|
105
|
+
const call = { liquid: "{{ post.date | readableDate }}", hbs: "{{readableDate post.date}}", ejs: "<%= readableDate(post.date) %>" }[engine] ?? "{{ readableDate(post.date) }}";
|
|
106
|
+
config = replaceOnce(config, "{{ readableDate(post.date) }}", call);
|
|
107
|
+
}
|
|
108
|
+
if (engine === "hbs" && config.includes("data: { search },")) {
|
|
109
|
+
config = replaceOnce(config, " data: { search },", ' // The path after `site.editUrl` in each page\'s "Edit this page" link.\n filters: {\n sourcePath: (inputPath) => inputPath.replace("./", ""),\n },\n\n data: { search },');
|
|
110
|
+
}
|
|
111
|
+
return config;
|
|
112
|
+
}
|
|
113
|
+
if (rel.endsWith(".md") && engine === "ejs") {
|
|
114
|
+
return rename(engine, contents).replace(/\{\{ ([\w.]+) \}\}/g, "<%= $1 %>");
|
|
115
|
+
}
|
|
116
|
+
if (rel.endsWith(".md") || rel.endsWith(".json")) return rename(engine, contents);
|
|
117
|
+
return contents;
|
|
118
|
+
}
|
|
119
|
+
function agentsMd(site) {
|
|
120
|
+
let files;
|
|
121
|
+
if (site) {
|
|
122
|
+
const language = { njk: "Nunjucks", edge: "Edge", liquid: "Liquid", hbs: "Handlebars", ejs: "EJS" }[site.engine] ?? "Jinja";
|
|
123
|
+
const pages = site.starter === "docs" ? "`src/docs/` has the pages (Markdown, with `src/_data/nav.yml` for the sidebar)" : "`src/posts/` has the posts and `src/` the other pages (Markdown)";
|
|
124
|
+
files = `\`ssqch.config.js\` is the config. ${pages}, \`src/_includes/\` the layouts and templates (${language}), \`src/_data/\` the global data and \`src/_blueprints/\` the blueprints for new pages. \`dist/\` is the build: don't edit it.`;
|
|
125
|
+
} else {
|
|
126
|
+
files = "`ssqch.config.js` (or `sitesquatch.toml`) is the config, and its `dirs` say where the pages, layouts (`_includes/`), global data (`_data/`) and the build are. Don't edit the build.";
|
|
127
|
+
}
|
|
128
|
+
const newPage = !site ? '`ssqch new <folder> --title "..."`, from a blueprint in `_blueprints/`' : site.starter === "docs" ? '`ssqch new docs/guides --title "..."` (then list it in `src/_data/nav.yml`)' : '`ssqch new posts --title "..."`';
|
|
129
|
+
const out = site ? "dist" : "<output>";
|
|
130
|
+
return `# A SiteSquatch site
|
|
131
|
+
|
|
132
|
+
This site is built with SiteSquatch (\`ssqch\`), a static site generator. ${files}
|
|
133
|
+
|
|
134
|
+
- How to use something: \`ssqch docs <name>\` (a config option, template function, command or topic) answers for the installed version, and \`ssqch docs\` lists everything.
|
|
135
|
+
- What this ssqch supports: \`ssqch capabilities --format json\`.
|
|
136
|
+
- Check a change: \`ssqch build --format json\`. \`ok\` is the result, and each problem has a \`code\`, a \`file\` and a \`line\`.
|
|
137
|
+
- Why a page's value is what it is: \`ssqch inspect <url or file> --format json\`.
|
|
138
|
+
- Before changing layouts or the config: \`ssqch build --output ${out}-before\`, and afterwards \`ssqch build\` and \`ssqch diff ${out}-before ${out}\`.
|
|
139
|
+
- A new page: ${newPage}.
|
|
140
|
+
- \`ssqch serve\` is for a person watching the browser. Check with \`ssqch build\`.
|
|
141
|
+
- A \`note:\` or hint naming another generator's word (\`pathPrefix\`): use ssqch's name.
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
function starterFiles(starter, engine) {
|
|
145
|
+
const common = (starter === "docs" ? DOCS_STARTER : STARTER).map(([rel, file]) => [rel, adapt(engine, rel, rel === "ssqch.d.ts" ? types() : bundled(file))]);
|
|
146
|
+
const set = (starter === "docs" ? DOCS_TEMPLATES : SITE_TEMPLATES)[engine === "njk" ? "jinja" : engine];
|
|
147
|
+
const templates = set.map(([rel, file]) => [`${rel}.${engine}`, rename(engine, bundled(file))]);
|
|
148
|
+
return [...common, ...templates, ["AGENTS.md", agentsMd({ starter, engine })], ["CLAUDE.md", "@AGENTS.md\n"]];
|
|
149
|
+
}
|
|
150
|
+
function write(file, contents, shown = file) {
|
|
151
|
+
const parent = parentAsGiven(shown);
|
|
152
|
+
if (parent !== "") {
|
|
153
|
+
try {
|
|
154
|
+
fs2.mkdirSync(path2.dirname(file), { recursive: true });
|
|
155
|
+
} catch (e) {
|
|
156
|
+
throw new Error(`creating ${parent}: ${e.message}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
fs2.writeFileSync(file, contents);
|
|
161
|
+
} catch (e) {
|
|
162
|
+
throw new Error(`writing ${shown}: ${e.message}`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
var isCurrentFolder = (dir) => dir.startsWith(".") && dir.split(path2.sep === "/" ? "/" : /[\\/]/).every((part) => part === "" || part === ".");
|
|
166
|
+
function runInit(options) {
|
|
167
|
+
const { dir, starter, engine, quiet } = options;
|
|
168
|
+
const written = [], skipped = [];
|
|
169
|
+
try {
|
|
170
|
+
if (!STARTERS.includes(starter)) throw new Error(`--starter ${starter}: not a starter (use ${STARTERS.join(" or ")})`);
|
|
171
|
+
if (!ENGINES.includes(engine)) throw new Error(`--engine ${engine}: not a starter engine (use ${ENGINES.join(", ")})`);
|
|
172
|
+
for (const [rel, contents] of starterFiles(starter, engine)) {
|
|
173
|
+
const file = path2.join(dir, rel);
|
|
174
|
+
if (fs2.existsSync(file)) skipped.push(rel);
|
|
175
|
+
else {
|
|
176
|
+
write(file, contents, joinAsGiven(dir, rel));
|
|
177
|
+
written.push(rel);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
} catch (e) {
|
|
181
|
+
process.stderr.write(`${red("error:")} ${e.message}
|
|
182
|
+
`);
|
|
183
|
+
return 1;
|
|
184
|
+
}
|
|
185
|
+
if (quiet) return 0;
|
|
186
|
+
let out = "";
|
|
187
|
+
for (const rel of written) out += ` created ${slashes(rel)}
|
|
188
|
+
`;
|
|
189
|
+
for (const rel of skipped) out += ` kept ${slashes(rel)} (already there)
|
|
190
|
+
`;
|
|
191
|
+
if (written.length === 0) out += "Nothing to do: camp is already set up (every starter file is there).\n";
|
|
192
|
+
else out += `
|
|
193
|
+
Camp is set up. Next: ${isCurrentFolder(dir) ? "" : `cd ${dir} && `}ssqch serve, then open http://localhost:8080
|
|
194
|
+
`;
|
|
195
|
+
process.stdout.write(out);
|
|
196
|
+
return 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export {
|
|
200
|
+
bundled,
|
|
201
|
+
bundledNames,
|
|
202
|
+
types,
|
|
203
|
+
STARTERS,
|
|
204
|
+
ENGINES,
|
|
205
|
+
DEFAULT_ENGINE,
|
|
206
|
+
starterEngines,
|
|
207
|
+
agentsMd,
|
|
208
|
+
starterFiles,
|
|
209
|
+
write,
|
|
210
|
+
runInit
|
|
211
|
+
};
|