@ca-plant-list/ca-plant-list 0.4.26 → 0.4.28

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.
Files changed (58) hide show
  1. package/data/exceptions.json +0 -27
  2. package/data/genera.json +52 -28
  3. package/data/glossary/anther.md +3 -0
  4. package/data/glossary/filament.md +3 -0
  5. package/data/glossary/stamen.md +3 -0
  6. package/data/illustrations/inkscape/stamen.svg +132 -0
  7. package/data/inatobsphotos.csv +0 -5
  8. package/data/inattaxonphotos.csv +69 -64
  9. package/data/synonyms.csv +155 -164
  10. package/data/taxa.csv +38 -38
  11. package/data/text/Dichelostemma-congestum.md +1 -0
  12. package/data/text/Dipterostemon-capitatus-subsp-capitatus.md +1 -0
  13. package/generators/eleventy/layouts/h1.njk +6 -0
  14. package/generators/eleventy/layouts/html.njk +55 -0
  15. package/lib/basepagerenderer.js +35 -15
  16. package/lib/config.js +5 -3
  17. package/lib/ebook/ebookpage.js +1 -4
  18. package/lib/ebook/ebooksitegenerator.js +4 -12
  19. package/lib/ebook/glossarypages.js +1 -3
  20. package/lib/ebook/plantbook.js +1 -1
  21. package/lib/files.js +1 -0
  22. package/lib/htmltaxon.js +8 -19
  23. package/lib/index.d.ts +20 -8
  24. package/lib/index.js +4 -2
  25. package/lib/jekyll.js +40 -59
  26. package/lib/markdown.js +3 -5
  27. package/lib/sitegenerator.js +68 -12
  28. package/lib/taxonomy/taxon.js +5 -1
  29. package/lib/tools/cch2.js +37 -18
  30. package/lib/tools/jepsonfamilies.js +1 -1
  31. package/lib/types.js +4 -0
  32. package/lib/utils/eleventyGenerator.js +82 -0
  33. package/lib/utils/htmlFragments.js +19 -0
  34. package/lib/web/glossarypages.js +6 -10
  35. package/lib/web/pageFamily.js +14 -14
  36. package/lib/web/pageGeneric.js +78 -0
  37. package/lib/web/{pagetaxon.js → pageTaxon.js} +4 -4
  38. package/lib/web/pageTaxonList.js +53 -0
  39. package/lib/{pagerenderer.js → web/renderAllPages.js} +38 -80
  40. package/package.json +12 -10
  41. package/scripts/build-site.js +20 -52
  42. package/scripts/cpl-photos.js +61 -24
  43. package/scripts/cpl-tools.js +4 -1
  44. package/static/assets/js/nameSearchData.js +2 -0
  45. package/{jekyll → static}/assets/js/name_search.js +12 -14
  46. package/static/name_search.html +15 -0
  47. package/jekyll/_includes/glossary.html +0 -0
  48. package/jekyll/name_search.html +0 -17
  49. package/lib/genericpage.js +0 -88
  50. /package/{jekyll → generators}/_includes/analytics.html +0 -0
  51. /package/{jekyll → generators}/_includes/menu_extra.html +0 -0
  52. /package/{jekyll → generators/jekyll}/_config.yml +0 -0
  53. /package/{jekyll → generators/jekyll}/_layouts/default.html +0 -0
  54. /package/{jekyll → generators/jekyll}/_layouts/html.html +0 -0
  55. /package/{jekyll → static}/assets/css/main.css +0 -0
  56. /package/{jekyll → static}/assets/js/ui.js +0 -0
  57. /package/{jekyll → static}/assets/js/utils.js +0 -0
  58. /package/{jekyll → static}/index.md +0 -0
@@ -1,5 +1,5 @@
1
1
  import { ExternalSites } from "../externalsites.js";
2
- import { GenericPage } from "../genericpage.js";
2
+ import { GenericPage } from "./pageGeneric.js";
3
3
  import { HTML } from "../html.js";
4
4
  import { HTMLTaxon } from "../htmltaxon.js";
5
5
  import { Sections } from "../taxonomy/families.js";
@@ -8,11 +8,11 @@ export class PageFamilyList extends GenericPage {
8
8
  #families;
9
9
 
10
10
  /**
11
- * @param {string} outputDir
11
+ * @param {import("../types.js").SiteGenerator} siteGenerator
12
12
  * @param {import("../types.js").Family[]} families
13
13
  */
14
- constructor(outputDir, families) {
15
- super(outputDir, "Families", "list_families");
14
+ constructor(siteGenerator, families) {
15
+ super(siteGenerator, "Families", "list_families");
16
16
  this.#families = families;
17
17
  }
18
18
 
@@ -28,7 +28,7 @@ export class PageFamilyList extends GenericPage {
28
28
  const taxa = sections[name];
29
29
 
30
30
  // Render the section page.
31
- new PageSection(this.getOutputDir(), name, taxa).render(
31
+ new PageSection(this.getSiteGenerator(), name, taxa).render(
32
32
  taxaColumns,
33
33
  );
34
34
 
@@ -69,13 +69,13 @@ export class PageFamilyList extends GenericPage {
69
69
  }
70
70
 
71
71
  /**
72
- * @param {string} outputDir
72
+ * @param {import("../types.js").SiteGenerator} siteGenerator
73
73
  * @param {import("../types.js").TaxaColDef[]} [taxaColumns]
74
74
  */
75
- renderPages(outputDir, taxaColumns) {
75
+ renderPages(siteGenerator, taxaColumns) {
76
76
  for (const family of this.#families) {
77
77
  if (family.getTaxa()) {
78
- new PageFamily(outputDir, family).render(taxaColumns);
78
+ new PageFamily(siteGenerator, family).render(taxaColumns);
79
79
  }
80
80
  }
81
81
  }
@@ -85,11 +85,11 @@ class PageFamily extends GenericPage {
85
85
  #family;
86
86
 
87
87
  /**
88
- * @param {string} outputDir
88
+ * @param {import("../types.js").SiteGenerator} siteGenerator
89
89
  * @param {import("../types.js").Family} family
90
90
  */
91
- constructor(outputDir, family) {
92
- super(outputDir, family.getName(), family.getBaseFileName());
91
+ constructor(siteGenerator, family) {
92
+ super(siteGenerator, family.getName(), family.getBaseFileName());
93
93
  this.#family = family;
94
94
  }
95
95
 
@@ -124,12 +124,12 @@ class PageSection extends GenericPage {
124
124
  #taxa;
125
125
 
126
126
  /**
127
- * @param {string} outputDir
127
+ * @param {import("../types.js").SiteGenerator} siteGenerator
128
128
  * @param {string} name
129
129
  * @param {import("../types.js").Taxon[]} taxa
130
130
  */
131
- constructor(outputDir, name, taxa) {
132
- super(outputDir, name, name);
131
+ constructor(siteGenerator, name, taxa) {
132
+ super(siteGenerator, name, name);
133
133
  this.#taxa = taxa;
134
134
  }
135
135
 
@@ -0,0 +1,78 @@
1
+ import path from "node:path";
2
+ import { Config } from "../config.js";
3
+ import { Files } from "../files.js";
4
+ import { HTMLFragments } from "../utils/htmlFragments.js";
5
+
6
+ export class GenericPage {
7
+ #siteGenerator;
8
+ #title;
9
+ #baseFileName;
10
+ #js;
11
+
12
+ /**
13
+ * @param {import("../types.js").SiteGenerator} siteGenerator
14
+ * @param {string} title
15
+ * @param {string} baseFileName
16
+ * @param {string} [js]
17
+ */
18
+ constructor(siteGenerator, title, baseFileName, js) {
19
+ this.#siteGenerator = siteGenerator;
20
+ this.#title = title;
21
+ this.#baseFileName = baseFileName;
22
+ this.#js = js;
23
+ }
24
+
25
+ getBaseFileName() {
26
+ return this.#baseFileName;
27
+ }
28
+
29
+ getDefaultIntro() {
30
+ let html = this.getFrontMatter();
31
+ return html + this.getMarkdown();
32
+ }
33
+
34
+ getFrontMatter() {
35
+ return this.#siteGenerator.getFrontMatter({
36
+ title: this.#title,
37
+ js: this.#js,
38
+ });
39
+ }
40
+
41
+ getMarkdown() {
42
+ const localTextPath = path.join(
43
+ "./data/intros",
44
+ `${this.#baseFileName}.md`,
45
+ );
46
+ const globalTextPath = path.join(
47
+ Config.getPackageDir(),
48
+ "./data/text/",
49
+ `${this.#baseFileName}.md`,
50
+ );
51
+ return (
52
+ HTMLFragments.getMarkdownSection(localTextPath) +
53
+ HTMLFragments.getMarkdownSection(globalTextPath)
54
+ );
55
+ }
56
+
57
+ getOutputDir() {
58
+ return this.#siteGenerator.getBaseDir();
59
+ }
60
+
61
+ getSiteGenerator() {
62
+ return this.#siteGenerator;
63
+ }
64
+
65
+ getTitle() {
66
+ return this.#title;
67
+ }
68
+
69
+ /**
70
+ * @param {string} html
71
+ */
72
+ writeFile(html) {
73
+ Files.write(
74
+ path.join(this.getOutputDir(), `${this.#baseFileName}.html`),
75
+ html,
76
+ );
77
+ }
78
+ }
@@ -1,5 +1,5 @@
1
1
  import { RarePlants } from "../rareplants.js";
2
- import { GenericPage } from "../genericpage.js";
2
+ import { GenericPage } from "./pageGeneric.js";
3
3
  import { HTML } from "../html.js";
4
4
  import { HTMLTaxon } from "../htmltaxon.js";
5
5
 
@@ -8,12 +8,12 @@ export class PageTaxon extends GenericPage {
8
8
  #taxon;
9
9
 
10
10
  /**
11
- * @param {string} outputDir
11
+ * @param {import("../types.js").SiteGenerator} siteGenerator
12
12
  * @param {import("../config.js").Config} config
13
13
  * @param {import("../types.js").Taxon} taxon
14
14
  */
15
- constructor(outputDir, config, taxon) {
16
- super(outputDir, taxon.getName(), taxon.getBaseFileName());
15
+ constructor(siteGenerator, config, taxon) {
16
+ super(siteGenerator, taxon.getName(), taxon.getBaseFileName());
17
17
  this.#config = config;
18
18
  this.#taxon = taxon;
19
19
  }
@@ -0,0 +1,53 @@
1
+ import { GenericPage } from "./pageGeneric.js";
2
+ import { HTML } from "../html.js";
3
+ import { HTMLTaxon } from "../htmltaxon.js";
4
+
5
+ export class PageTaxonList extends GenericPage {
6
+ /**
7
+ * @param {import("../types.js").SiteGenerator} siteGenerator
8
+ * @param {string} title
9
+ * @param {string} baseName
10
+ */
11
+ constructor(siteGenerator, title, baseName) {
12
+ super(siteGenerator, title, baseName);
13
+ }
14
+
15
+ /**
16
+ *
17
+ * @param {import("../types.js").Taxon[]} taxa
18
+ * @param {import("../types.js").TaxaColDef[]|undefined} columns
19
+ */
20
+ render(taxa, columns) {
21
+ let html = this.getDefaultIntro();
22
+
23
+ html += '<div class="wrapper">';
24
+
25
+ html += '<div class="section">';
26
+ html += HTMLTaxon.getTaxaTable(taxa, columns);
27
+ html += "</div>";
28
+
29
+ html += '<div class="section nobullet">';
30
+ html += HTML.textElement("h2", "Download");
31
+ html += "<ul>";
32
+ html +=
33
+ "<li>" +
34
+ HTML.getLink(
35
+ "./calflora_" + this.getBaseFileName() + ".txt",
36
+ "Calflora List",
37
+ ) +
38
+ "</li>";
39
+ html +=
40
+ "<li>" +
41
+ HTML.getLink(
42
+ "./inat_" + this.getBaseFileName() + ".txt",
43
+ "iNaturalist List",
44
+ ) +
45
+ "</li>";
46
+ html += "</ul>";
47
+ html += "</div>";
48
+
49
+ html += "</div>";
50
+
51
+ this.writeFile(html);
52
+ }
53
+ }
@@ -1,10 +1,11 @@
1
- import { PageTaxon } from "./web/pagetaxon.js";
2
- import { RarePlants } from "./rareplants.js";
3
- import { BasePageRenderer } from "./basepagerenderer.js";
4
- import { GenericPage } from "./genericpage.js";
5
- import { Files } from "./files.js";
6
- import { HTML } from "./html.js";
7
- import { HTMLTaxon, TAXA_LIST_COLS } from "./htmltaxon.js";
1
+ import { RarePlants } from "../rareplants.js";
2
+ import { BasePageRenderer } from "../basepagerenderer.js";
3
+ import { Files } from "../files.js";
4
+ import { HTML } from "../html.js";
5
+ import { TAXA_LIST_COLS } from "../htmltaxon.js";
6
+ import { PageTaxonList } from "./pageTaxonList.js";
7
+ import { HTMLFragments } from "../utils/htmlFragments.js";
8
+ import { PageTaxon } from "./pageTaxon.js";
8
9
 
9
10
  const ENDANGERED_COLS = [
10
11
  TAXA_LIST_COLS.SPECIES,
@@ -18,33 +19,33 @@ const RPI_COLUMNS = [
18
19
  TAXA_LIST_COLS.CNPS_RANK,
19
20
  ];
20
21
 
21
- class PageRenderer extends BasePageRenderer {
22
+ export class PageRenderer extends BasePageRenderer {
22
23
  /**
23
- * @param {string} outputDir
24
- * @param {import('./config.js').Config} config
25
- * @param {import("./types.js").Taxa} taxa
24
+ * @param {import("../types.js").SiteGenerator} siteGenerator
25
+ * @param {import('../config.js').Config} config
26
+ * @param {import("../types.js").Taxa} taxa
26
27
  */
27
- static render(outputDir, config, taxa) {
28
- super.renderBasePages(outputDir, taxa);
28
+ static renderAll(siteGenerator, config, taxa) {
29
+ super.renderBasePages(siteGenerator, taxa);
29
30
 
30
- this.renderLists(outputDir, config, taxa);
31
+ this.renderLists(siteGenerator, config, taxa);
31
32
 
32
33
  const taxonList = taxa.getTaxonList();
33
34
  for (const taxon of taxonList) {
34
- new PageTaxon(outputDir, config, taxon).render();
35
+ new PageTaxon(siteGenerator, config, taxon).render();
35
36
  }
36
37
  }
37
38
 
38
39
  /**
39
- * @param {string} outputDir
40
- * @param {import('./config.js').Config} config
41
- * @param {import("./types.js").Taxa} taxa
40
+ * @param {import("../types.js").SiteGenerator} siteGenerator
41
+ * @param {import('../config.js').Config} config
42
+ * @param {import("../types.js").Taxa} taxa
42
43
  */
43
- static renderLists(outputDir, config, taxa) {
44
+ static renderLists(siteGenerator, config, taxa) {
44
45
  /**
45
46
  * @param {ListInfo[]} listInfo
46
47
  * @param {Object<string,string>} attributes
47
- * @param {import("./types.js").TaxaColDef[]} [columns]
48
+ * @param {import("../types.js").TaxaColDef[]} [columns]
48
49
  * @returns {string}
49
50
  */
50
51
  function getListArray(listInfo, attributes = {}, columns) {
@@ -75,10 +76,11 @@ class PageRenderer extends BasePageRenderer {
75
76
  );
76
77
 
77
78
  const cols = columns ? columns : list.columns;
78
- new PageTaxonList(outputDir, list.name, list.filename).render(
79
- listTaxa,
80
- cols,
81
- );
79
+ new PageTaxonList(
80
+ siteGenerator,
81
+ list.name,
82
+ list.filename,
83
+ ).render(listTaxa, cols);
82
84
 
83
85
  // Check for sublists.
84
86
  const subListHTML = list.listInfo
@@ -117,7 +119,9 @@ class PageRenderer extends BasePageRenderer {
117
119
  return html;
118
120
  }
119
121
 
120
- /** @typedef {{name:string,filename:string,include:function(import("./types.js").Taxon):boolean,columns?:import("./types.js").TaxaColDef[],listInfo?:ListInfo[]}} ListInfo */
122
+ const outputDir = siteGenerator.getBaseDir();
123
+
124
+ /** @typedef {{name:string,filename:string,include:function(import("../types.js").Taxon):boolean,columns?:import("../types.js").TaxaColDef[],listInfo?:ListInfo[]}} ListInfo */
121
125
  /** @type {{title:string,listInfo:ListInfo[]}[]} */
122
126
  const sections = [
123
127
  {
@@ -191,7 +195,10 @@ class PageRenderer extends BasePageRenderer {
191
195
  },
192
196
  ];
193
197
 
194
- let html = '<div class="wrapper">';
198
+ let html =
199
+ HTMLFragments.getMarkdownSection("./data/intros/index_lists.md") +
200
+ '<div class="wrapper">';
201
+
195
202
  for (const section of sections) {
196
203
  const listHTML = getListArray(section.listInfo);
197
204
 
@@ -208,59 +215,10 @@ class PageRenderer extends BasePageRenderer {
208
215
 
209
216
  html += "</div>";
210
217
 
211
- // Write lists to includes directory so it can be inserted into pages.
212
- Files.write(outputDir + "/_includes/plantlists.html", html);
213
- }
214
- }
215
-
216
- class PageTaxonList extends GenericPage {
217
- /**
218
- * @param {string} outputDir
219
- * @param {string} title
220
- * @param {string} baseName
221
- */
222
- constructor(outputDir, title, baseName) {
223
- super(outputDir, title, baseName);
224
- }
225
-
226
- /**
227
- *
228
- * @param {import("./types.js").Taxon[]} taxa
229
- * @param {import("./types.js").TaxaColDef[]|undefined} columns
230
- */
231
- render(taxa, columns) {
232
- let html = this.getDefaultIntro();
233
-
234
- html += '<div class="wrapper">';
235
-
236
- html += '<div class="section">';
237
- html += HTMLTaxon.getTaxaTable(taxa, columns);
238
- html += "</div>";
239
-
240
- html += '<div class="section nobullet">';
241
- html += HTML.textElement("h2", "Download");
242
- html += "<ul>";
243
- html +=
244
- "<li>" +
245
- HTML.getLink(
246
- "./calflora_" + this.getBaseFileName() + ".txt",
247
- "Calflora List",
248
- ) +
249
- "</li>";
250
- html +=
251
- "<li>" +
252
- HTML.getLink(
253
- "./inat_" + this.getBaseFileName() + ".txt",
254
- "iNaturalist List",
255
- ) +
256
- "</li>";
257
- html += "</ul>";
258
- html += "</div>";
259
-
260
- html += "</div>";
261
-
262
- this.writeFile(html);
218
+ siteGenerator.writeTemplate(
219
+ html,
220
+ { title: "Plant lists" },
221
+ "index_lists.html",
222
+ );
263
223
  }
264
224
  }
265
-
266
- export { PageRenderer };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ca-plant-list/ca-plant-list",
3
- "version": "0.4.26",
4
- "description": "Tools to create Jekyll files for a website listing plants in an area of California.",
3
+ "version": "0.4.28",
4
+ "description": "Tools to create files for a website listing plants in an area of California.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -12,9 +12,10 @@
12
12
  "files": [
13
13
  "data",
14
14
  "ebook",
15
- "jekyll",
15
+ "generators",
16
16
  "lib",
17
- "scripts"
17
+ "scripts",
18
+ "static"
18
19
  ],
19
20
  "exports": {
20
21
  ".": "./lib/index.js"
@@ -22,10 +23,10 @@
22
23
  "types": "./lib/index.d.ts",
23
24
  "scripts": {
24
25
  "check": "npm run eslint && npm run tsc && npm run jest",
25
- "eslint": "npx eslint",
26
+ "eslint": "eslint",
26
27
  "jest": "node --experimental-vm-modules node_modules/jest/bin/jest.js tests",
27
- "prettier": "npx prettier -l .",
28
- "tsc": "npx tsc"
28
+ "prettier": "prettier -l .",
29
+ "tsc": "tsc"
29
30
  },
30
31
  "bin": {
31
32
  "ca-plant-list": "scripts/build-site.js",
@@ -35,10 +36,11 @@
35
36
  "inatobsphotos": "scripts/inatobsphotos.js"
36
37
  },
37
38
  "dependencies": {
39
+ "@11ty/eleventy": "^3.0.0",
38
40
  "@htmltools/scrape": "^0.1.1",
39
41
  "archiver": "^5.3.1",
40
42
  "cli-progress": "^3.12.0",
41
- "commander": "^12.1.0",
43
+ "commander": "^13.1.0",
42
44
  "csv-parse": "^5.6.0",
43
45
  "csv-stringify": "^6.5.2",
44
46
  "exceljs": "^4.4.0",
@@ -55,9 +57,9 @@
55
57
  "@types/markdown-it": "^14.1.2",
56
58
  "@types/node": "^22.10.7",
57
59
  "@types/unzipper": "^0.10.9",
58
- "eslint": "^9.18.0",
60
+ "eslint": "^9.20.1",
59
61
  "jest": "^29.7.0",
60
- "prettier": "^3.4.2",
62
+ "prettier": "^3.5.1",
61
63
  "puppeteer": "^24.1.1",
62
64
  "typescript": "^5.7.3"
63
65
  }
@@ -1,76 +1,44 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import * as child_process from "node:child_process";
4
- import * as path from "node:path";
5
3
  import { Config } from "../lib/config.js";
6
- import { PageRenderer } from "../lib/pagerenderer.js";
4
+ import { PageRenderer } from "../lib/web/renderAllPages.js";
7
5
  import { Files } from "../lib/files.js";
8
6
  import { Program } from "../lib/program.js";
9
7
  import { Taxa } from "../lib/taxonomy/taxa.js";
10
8
  import { ErrorLog } from "../lib/errorlog.js";
11
9
 
12
- class JekyllRenderer {
13
- #srcDir = "./output";
14
- #destDir = "./public";
15
-
16
- async renderPages() {
17
- /**
18
- * @param {string[]} configFiles
19
- * @param {string} dir
20
- * @param {string} name
21
- */
22
- function addConfigFile(configFiles, dir, name) {
23
- const fullPath = path.join(dir, name);
24
- if (Files.exists(fullPath)) {
25
- configFiles.push(fullPath);
26
- }
27
- }
28
-
29
- // Remove existing files.
30
- Files.rmDir(this.#destDir);
31
-
32
- const options = [
33
- "--source",
34
- this.#srcDir,
35
- "--destination",
36
- this.#destDir,
37
- ];
38
-
39
- // Find out what config files are available.
40
- /** @type {string[]} */
41
- const configFiles = [];
42
- addConfigFile(configFiles, this.#srcDir, "_config.yml");
43
- addConfigFile(configFiles, this.#srcDir, "_config-local.yml");
44
- addConfigFile(configFiles, ".", "_config-dev.yml");
45
- options.push("--config", `"${configFiles.join()}"`);
46
-
47
- const result = child_process.execSync(
48
- "bundle exec jekyll build " + options.join(" "),
49
- );
50
- console.log(result.toString());
51
- }
52
- }
53
-
54
10
  /**
55
- * @param {import("commander").OptionValues} options
11
+ * @param {{outputdir:string,datadir:string,webdir:string,showFlowerErrors:boolean,render:boolean}} options
56
12
  */
57
13
  async function build(options) {
58
- Files.rmDir(options.outputdir);
59
- const errorLog = new ErrorLog(options.outputdir + "/errors.tsv");
14
+ console.info("generating templates");
15
+ const outputDir = options.outputdir;
16
+ Files.rmDir(outputDir);
17
+ const errorLog = new ErrorLog(outputDir + "/errors.tsv");
60
18
  const taxa = new Taxa(
61
19
  Program.getIncludeList(options.datadir),
62
20
  errorLog,
63
21
  options.showFlowerErrors,
64
22
  );
65
- PageRenderer.render(options.outputdir, new Config(options.datadir), taxa);
23
+ const config = new Config(options.datadir);
24
+ const generator = PageRenderer.newSiteGenerator(config, outputDir);
25
+ PageRenderer.renderAll(generator, config, taxa);
66
26
  errorLog.write();
67
27
 
68
- console.log("generating site");
69
- const r = new JekyllRenderer();
70
- await r.renderPages();
28
+ if (options.render) {
29
+ console.info("generating site");
30
+ Files.rmDir(options.webdir);
31
+ await generator.generate(options.webdir);
32
+ }
71
33
  }
72
34
 
73
35
  const program = Program.getProgram();
36
+ program.option(
37
+ "--no-render",
38
+ "Do not render full HTML output (only build the templates)",
39
+ );
40
+ program.option("-w, --webdir", "Directory for fully processed files", "public");
41
+
74
42
  program.action(build);
75
43
 
76
44
  await program.parseAsync();