From f62f270e5effac9f9aff644178d2095e88e61f66 Mon Sep 17 00:00:00 2001 From: Talon Poole Date: Thu, 25 Feb 2021 17:19:27 +0000 Subject: [PATCH] is this it? --- cli.js | 5 +---- css.js | 7 +++++-- gmi-web.1.scd | 2 +- html.js | 8 +++++--- package.json | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cli.js b/cli.js index f07f9b7..0fc687c 100755 --- a/cli.js +++ b/cli.js @@ -89,10 +89,7 @@ Object.keys(CSS_VARS).forEach((key) => { cli.conflicts(key, "core"); cli.conflicts(key, "none"); }); -cli.group( - Object.keys(CSS_VARS), - `${css}:` -); +cli.group(Object.keys(CSS_VARS), `${css}:`); const argv = cli .conflicts("author", "body") diff --git a/css.js b/css.js index 953da6f..aea746a 100644 --- a/css.js +++ b/css.js @@ -46,7 +46,8 @@ export function load(options) { if ( !["gmi.css", "gmi-web.css"].includes(options.css) || !existsSync(options.css) - ) throw new Error(`Cannot find file ${options.css}.`); + ) + throw new Error(`Cannot find file ${options.css}.`); const internal = (file) => path.resolve(path.dirname(new URL(import.meta.url).pathname), file); @@ -69,7 +70,9 @@ export function rootVariables(rules) { if (!root) return {}; return root.declarations.reduce( (obj, { property, value }) => - !/^\-\-/.test(property) ? obj : Object.assign(obj, { [property.replace("--", "")]: value }), + !/^\-\-/.test(property) + ? obj + : Object.assign(obj, { [property.replace("--", "")]: value }), {} ); } diff --git a/gmi-web.1.scd b/gmi-web.1.scd index e154764..dfe05bc 100644 --- a/gmi-web.1.scd +++ b/gmi-web.1.scd @@ -26,7 +26,7 @@ fashion! Use *--author* _NAME_ to set the author tag on every file. - Use *--descriptions* [_LIMIT_] to apply the first non-empty text line of each + Use *--description* [_LIMIT_] to apply the first non-empty text line of each file as the description tag. _LIMIT_ may be used to truncate the text with an ellipsis at that number of characters. diff --git a/html.js b/html.js index fdf764e..4e6b854 100644 --- a/html.js +++ b/html.js @@ -141,11 +141,13 @@ export function head(tokens, options) { ${ options.styleTag } -${tokens.find(({h1}) => h1).h1 || ""}${ - options.author ? `\n` : "" +${tokens.find(({ h1 }) => h1).h1 || ""}${ + options.author ? `\n` : "" }${ description - ? `\n` + ? `\n` : "" }${ options.canonical diff --git a/package.json b/package.json index 794463e..6b4dbff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gmi-web-cli", - "version": "1.0.0-rc.4", + "version": "1.0.0", "description": "A bridge between Gemini and HTML", "main": "html.js", "type": "module",