From bf8b806ed55d4483e72683800339f8cf9a6bc7a2 Mon Sep 17 00:00:00 2001 From: Talon Poole Date: Thu, 25 Feb 2021 20:46:53 +0000 Subject: [PATCH] 1.0.8-rc.4 --- cli.js | 2 +- css.js | 4 +++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cli.js b/cli.js index 144af50..a5749bd 100755 --- a/cli.js +++ b/cli.js @@ -6,7 +6,7 @@ import yargs from "yargs"; import * as CSS from "./css.js"; import { streamHTML, toHTML } from "./html.js"; -export const internal = (file) => +const internal = (file) => path.resolve(path.dirname(new URL(import.meta.url).pathname), file); const pkg = JSON.parse(readFileSync(internal("package.json"), "utf-8")); diff --git a/css.js b/css.js index 92f4a8e..776ba09 100644 --- a/css.js +++ b/css.js @@ -2,7 +2,9 @@ import { readFileSync, existsSync } from "fs"; // TODO import.meta.resolve is supposed to accomplish this without "path" import path from "path"; import { stringify, parse } from "css"; -import { internal } from "./cli.js" + +const internal = (file) => + path.resolve(path.dirname(new URL(import.meta.url).pathname), file); export function style(options) { if (options.inline || options.css === "none") return ""; diff --git a/package.json b/package.json index 089dd6a..97755e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gmi-web-cli", - "version": "1.0.7-rc.4", + "version": "1.0.8-rc.4", "description": "Convert text/gemini to text/html.", "main": "html.js", "type": "module",