nowebcli 0.2.16 → 0.2.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nowebcli",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Create, preview and publish community templates for Noweb",
5
5
  "license": "MIT",
6
6
  "repository": {
package/scripts/noweb.mjs CHANGED
@@ -130,9 +130,9 @@ async function checkRepositoryTemplates(value, quiet = false, assetRoot = "/asse
130
130
  return results;
131
131
  }
132
132
 
133
- async function checkProject(quiet = false) {
133
+ async function checkProject(quiet = false, requireCover = true) {
134
134
  if (!quiet) progress.start("Validating and compiling template…");
135
- const result = await buildTemplate(root);
135
+ const result = await buildTemplate(root, undefined, "/assets", requireCover);
136
136
  if (!quiet) success(`✓ ${result.slug} (${result.fields} fields, ${formatBytes(result.js.length + result.css.length)})`);
137
137
  return result;
138
138
  }
@@ -251,7 +251,7 @@ async function dev() {
251
251
  try {
252
252
  const url = new URL(request.url || "/", `http://${request.headers.host || "127.0.0.1"}`);
253
253
  if (url.pathname === "/") {
254
- const template = await checkProject(true);
254
+ const template = await checkProject(true, false);
255
255
  response.writeHead(200, { "Cache-Control": "no-store", "Content-Type": "text/html; charset=utf-8" });
256
256
  response.end(previewHtml(template));
257
257
  success(`✓ rebuilt ${template.slug}`);