summaryrefslogtreecommitdiff
path: root/dev/generate-css-json.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-30 20:00:46 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-30 20:00:46 -0500
commit338d210b66006189a0b775e8bd524c1cc11c2d9a (patch)
tree12fbd7eb03dcbb7ffcf270a1e7f9a8ee0cf53996 /dev/generate-css-json.js
parent43bc4e3015a7b6c4f4941c4b6327a7445b356f1c (diff)
Update paths
Diffstat (limited to 'dev/generate-css-json.js')
-rw-r--r--dev/generate-css-json.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/dev/generate-css-json.js b/dev/generate-css-json.js
index 02e54530..e5d4d7f0 100644
--- a/dev/generate-css-json.js
+++ b/dev/generate-css-json.js
@@ -19,6 +19,9 @@
import css from 'css';
import fs from 'fs';
import path from 'path';
+import {fileURLToPath} from 'url';
+
+const dirname = path.dirname(fileURLToPath(import.meta.url));
/**
* @returns {{cssFile: string, overridesCssFile: string, outputPath: string}[]}
@@ -26,14 +29,14 @@ import path from 'path';
export function getTargets() {
return [
{
- cssFile: path.join(__dirname, '..', 'ext/css/structured-content.css'),
- overridesCssFile: path.join(__dirname, 'data/structured-content-overrides.css'),
- outputPath: path.join(__dirname, '..', 'ext/data/structured-content-style.json')
+ cssFile: path.join(dirname, '..', 'ext/css/structured-content.css'),
+ overridesCssFile: path.join(dirname, 'data/structured-content-overrides.css'),
+ outputPath: path.join(dirname, '..', 'ext/data/structured-content-style.json')
},
{
- cssFile: path.join(__dirname, '..', 'ext/css/display-pronunciation.css'),
- overridesCssFile: path.join(__dirname, 'data/display-pronunciation-overrides.css'),
- outputPath: path.join(__dirname, '..', 'ext/data/pronunciation-style.json')
+ cssFile: path.join(dirname, '..', 'ext/css/display-pronunciation.css'),
+ overridesCssFile: path.join(dirname, 'data/display-pronunciation-overrides.css'),
+ outputPath: path.join(dirname, '..', 'ext/data/pronunciation-style.json')
}
];
}