@refrakt-md/astro 0.12.0 → 0.14.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAI9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,OAAO,GAAE,mBAAwB,GAAG,gBAAgB,CAsC3E"}
|
package/dist/integration.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { CORE_PACKAGES } from '@refrakt-md/transform';
|
|
3
3
|
import { loadRefraktConfig, resolveSite } from '@refrakt-md/transform/node';
|
|
4
|
+
import { getThemePackage } from '@refrakt-md/types';
|
|
4
5
|
/**
|
|
5
6
|
* Astro integration for refrakt.
|
|
6
7
|
*
|
|
@@ -16,10 +17,11 @@ export function refrakt(options = {}) {
|
|
|
16
17
|
'astro:config:setup'({ config, updateConfig, addWatchFile, injectScript }) {
|
|
17
18
|
const refraktConfig = loadRefraktConfig(configPath);
|
|
18
19
|
const { site } = resolveSite(refraktConfig, options.site);
|
|
20
|
+
const themePackage = getThemePackage(site.theme);
|
|
19
21
|
const noExternal = [
|
|
20
22
|
...CORE_PACKAGES,
|
|
21
23
|
'@refrakt-md/astro',
|
|
22
|
-
|
|
24
|
+
themePackage,
|
|
23
25
|
...(site.plugins ?? []),
|
|
24
26
|
];
|
|
25
27
|
updateConfig({
|
|
@@ -33,7 +35,7 @@ export function refrakt(options = {}) {
|
|
|
33
35
|
},
|
|
34
36
|
});
|
|
35
37
|
// Inject theme CSS so page templates don't hardcode a theme package
|
|
36
|
-
injectScript('page-ssr', `import '${
|
|
38
|
+
injectScript('page-ssr', `import '${themePackage}';`);
|
|
37
39
|
// Watch content directory for changes in dev mode
|
|
38
40
|
const contentDir = resolve(config.root.pathname, site.contentDir);
|
|
39
41
|
addWatchFile(contentDir);
|
package/dist/integration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,UAA+B,EAAE;IACxD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,uBAAuB,CAAC;IAEjE,OAAO;QACN,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE;YACN,oBAAoB,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE;gBACxE,MAAM,aAAa,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;gBACpD,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1D,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACjD,MAAM,UAAU,GAAG;oBAClB,GAAG,aAAa;oBAChB,mBAAmB;oBACnB,YAAY;oBACZ,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;iBACvB,CAAC;gBAEF,YAAY,CAAC;oBACZ,IAAI,EAAE;wBACL,GAAG,EAAE;4BACJ,UAAU;4BACV,YAAY,EAAE;gCACb,OAAO,EAAE,CAAC,kBAAkB,CAAC;6BAC7B;yBACD;qBACD;iBACD,CAAC,CAAC;gBAEH,oEAAoE;gBACpE,YAAY,CAAC,UAAU,EAAE,WAAW,YAAY,IAAI,CAAC,CAAC;gBAEtD,kDAAkD;gBAClD,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;gBAClE,YAAY,CAAC,UAAU,CAAC,CAAC;YAC1B,CAAC;SACD;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/astro",
|
|
3
3
|
"description": "Astro integration for refrakt.md — render Markdoc runes in Astro projects",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.1",
|
|
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.14.1",
|
|
37
|
+
"@refrakt-md/content": "0.14.1",
|
|
38
|
+
"@refrakt-md/transform": "0.14.1",
|
|
39
|
+
"@refrakt-md/types": "0.14.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"astro": "^5.0.0"
|