@forsakringskassan/docs-generator 3.21.1 → 3.22.1

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/README.md CHANGED
@@ -6,6 +6,9 @@ npm install --save-dev --save-exact @forsakringskassan/docs-generator
6
6
 
7
7
  ## Setup
8
8
 
9
+ Pass `import.meta.dirname` as the first argument to `Generator` to use the directory of your configuration file as the working directory.
10
+ Paths in the generator options are resolved relative to this directory.
11
+
9
12
  ### Watch (development mode)
10
13
 
11
14
  You can start a development server with watch for incremental builds using `.serve()`.
@@ -16,7 +19,7 @@ import {
16
19
  livereloadProcessor,
17
20
  } from "@forsakringskassan/docs-generator";
18
21
 
19
- const docs = new Generator(import.meta.url, {
22
+ const docs = new Generator(import.meta.dirname, {
20
23
  site: {
21
24
  name: "My Awesome Site",
22
25
  },
@@ -39,7 +42,7 @@ import {
39
42
  livereloadProcessor,
40
43
  } from "@forsakringskassan/docs-generator";
41
44
 
42
- const docs = new Generator(import.meta.url, {
45
+ const docs = new Generator(import.meta.dirname, {
43
46
  site: {
44
47
  name: "My Awesome Site",
45
48
  },
@@ -115,7 +118,7 @@ Style can be compiled with `compileStyle(name, src, [options])`:
115
118
  ```ts
116
119
  import { Generator } from "@forsakringskassan/docs-generator";
117
120
 
118
- const docs = new Generator(import.meta.url, {
121
+ const docs = new Generator(import.meta.dirname, {
119
122
  site: {
120
123
  name: "My Awesome Site",
121
124
  },
@@ -302,7 +305,7 @@ for (const entry of Object.values(icons)) {
302
305
  ### Matomo
303
306
 
304
307
  ```diff
305
- const docs = new Generator(import.meta.url, {
308
+ const docs = new Generator(import.meta.dirname, {
306
309
  processors: [
307
310
  + matomoProcessor({
308
311
  + siteId: "1",
@@ -316,7 +319,7 @@ for (const entry of Object.values(icons)) {
316
319
  Optionally set `hostname` to limit which hostnames can run Matomo analytics:
317
320
 
318
321
  ```diff
319
- const docs = new Generator(import.meta.url, {
322
+ const docs = new Generator(import.meta.dirname, {
320
323
  processors: [
321
324
  matomoProcessor({
322
325
  siteId: "1",
@@ -2,7 +2,7 @@ import { createRequire as $createRequire } from "node:module";
2
2
 
3
3
  const require = $createRequire(import.meta.url);
4
4
 
5
- import { c as createSyncFn, d as dedent, H as HighlightJS, b as createTwoFilesPatch, M as MarkdownItCallable, e as deflist_plugin } from './vendor-DBujHFR5.mjs';
5
+ import { c as createSyncFn, d as dedent, H as HighlightJS, b as createTwoFilesPatch, M as MarkdownItCallable, e as deflist_plugin } from './vendor-D1q9wBug.mjs';
6
6
  import path from 'node:path/posix';
7
7
  import path__default from 'node:path';
8
8
  import 'node:fs/promises';
@@ -76,7 +76,7 @@ function getOutputFilePath(outputFolder, fileInfo) {
76
76
  return normalizePath(outputFolder, path, outputName);
77
77
  }
78
78
 
79
- const url = new URL("./format-code.worker-BsMUHGd2.mjs", import.meta.url);
79
+ const url = new URL("./format-code.worker-Ce20Jr32.mjs", import.meta.url);
80
80
  const filePath = fileURLToPath(url);
81
81
 
82
82
  const formatCode = createSyncFn(filePath);
@@ -1140,4 +1140,4 @@ function createMarkdownRenderer(options) {
1140
1140
  }
1141
1141
 
1142
1142
  export { SoftError as S, getFingerprint as a, parseImport as b, createMarkdownRenderer as c, findTag as d, getOutputFilePath as e, formatCode as f, generateId as g, hasTag as h, isDocumentPage as i, findDocument as j, getDocumentBody as k, htmlencode as l, normalizePath as n, parseInfostring as p };
1143
- //# sourceMappingURL=create-markdown-renderer-CX0kOizk.mjs.map
1143
+ //# sourceMappingURL=create-markdown-renderer-Bdz-A22S.mjs.map