@refrakt-md/nuxt 0.10.1 → 0.11.0
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/dist/module.d.ts.map +1 -1
- package/dist/module.js +6 -5
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";AAMA,wBAsCG"}
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule } from 'nuxt/kit';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { CORE_PACKAGES } from '@refrakt-md/transform';
|
|
4
|
-
import { loadRefraktConfig } from '@refrakt-md/transform/node';
|
|
4
|
+
import { loadRefraktConfig, resolveSite } from '@refrakt-md/transform/node';
|
|
5
5
|
export default defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
7
|
name: '@refrakt-md/nuxt',
|
|
@@ -12,20 +12,21 @@ export default defineNuxtModule({
|
|
|
12
12
|
},
|
|
13
13
|
setup(options, nuxt) {
|
|
14
14
|
const refraktConfig = loadRefraktConfig(options.configPath);
|
|
15
|
+
const { site } = resolveSite(refraktConfig, options.site);
|
|
15
16
|
// Add packages to transpile list
|
|
16
17
|
const transpile = [
|
|
17
18
|
...CORE_PACKAGES,
|
|
18
19
|
'@refrakt-md/nuxt',
|
|
19
|
-
|
|
20
|
-
`${
|
|
21
|
-
...(
|
|
20
|
+
site.theme,
|
|
21
|
+
`${site.theme}/nuxt`,
|
|
22
|
+
...(site.packages ?? []),
|
|
22
23
|
];
|
|
23
24
|
nuxt.options.build.transpile.push(...transpile);
|
|
24
25
|
// Configure Vue to treat rf-* as custom elements (compose with existing)
|
|
25
26
|
const prevIsCustomElement = nuxt.options.vue.compilerOptions.isCustomElement;
|
|
26
27
|
nuxt.options.vue.compilerOptions.isCustomElement = (tag) => tag.startsWith('rf-') || (prevIsCustomElement ? prevIsCustomElement(tag) : false);
|
|
27
28
|
// Watch content directory for HMR
|
|
28
|
-
const contentDir = resolve(nuxt.options.rootDir,
|
|
29
|
+
const contentDir = resolve(nuxt.options.rootDir, site.contentDir);
|
|
29
30
|
nuxt.hook('builder:watch', async (_event, relativePath) => {
|
|
30
31
|
if (relativePath.endsWith('.md')) {
|
|
31
32
|
const absPath = resolve(nuxt.options.rootDir, relativePath);
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG5E,eAAe,gBAAgB,CAAqB;IACnD,IAAI,EAAE;QACL,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,SAAS;KACpB;IACD,QAAQ,EAAE;QACT,UAAU,EAAE,uBAAuB;KACnC;IACD,KAAK,CAAC,OAA2B,EAAE,IAAS;QAC3C,MAAM,aAAa,GA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AC,CAAC;gBAC5C,CAAC;YACF,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -8,5 +8,8 @@ import type { AdapterTheme } from '@refrakt-md/transform';
|
|
|
8
8
|
export type NuxtTheme = AdapterTheme;
|
|
9
9
|
export interface RefraktNuxtOptions {
|
|
10
10
|
configPath?: string;
|
|
11
|
+
/** Which site to use from the config. Required when the config declares
|
|
12
|
+
* multiple `sites.*`; optional (and resolves to the lone site) otherwise. */
|
|
13
|
+
site?: string;
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC;AAErC,MAAM,WAAW,kBAAkB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC;AAErC,MAAM,WAAW,kBAAkB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;kFAC8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;CACd"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/nuxt",
|
|
3
3
|
"description": "Nuxt module for refrakt.md — render Markdoc runes in Nuxt projects",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"build": "tsc"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@refrakt-md/behaviors": "0.
|
|
37
|
-
"@refrakt-md/content": "0.
|
|
38
|
-
"@refrakt-md/transform": "0.
|
|
39
|
-
"@refrakt-md/types": "0.
|
|
36
|
+
"@refrakt-md/behaviors": "0.11.0",
|
|
37
|
+
"@refrakt-md/content": "0.11.0",
|
|
38
|
+
"@refrakt-md/transform": "0.11.0",
|
|
39
|
+
"@refrakt-md/types": "0.11.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"nuxt": "^3.0.0",
|