@eventcatalog/core 2.0.16 → 2.0.17
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/CHANGELOG.md +6 -0
- package/bin/dist/eventcatalog.config.d.cts +2 -1
- package/bin/dist/eventcatalog.config.d.ts +2 -1
- package/bin/eventcatalog.config.ts +2 -1
- package/package.json +1 -1
- package/scripts/catalog-to-astro-content-directory.js +9 -0
- package/scripts/start-catalog-locally.js +0 -1
- package/src/components/Header.astro +8 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -100,6 +100,15 @@ export const catalogToAstro = async (source, astroContentDir, catalogFilesDir) =
|
|
|
100
100
|
// ensureDirSync(astroContentDir);
|
|
101
101
|
fs.writeFileSync(path.join(astroContentDir, 'config.ts'), astroConfigFile);
|
|
102
102
|
|
|
103
|
+
// Copy the public directory files into the astro public directory
|
|
104
|
+
const usersPublicDirectory = path.join(source, 'public');
|
|
105
|
+
const astroPublicDir = path.join(astroContentDir, '../../public');
|
|
106
|
+
|
|
107
|
+
if (fs.existsSync(usersPublicDirectory)) {
|
|
108
|
+
// fs.mkdirSync(astroPublicDir, { recursive: true });
|
|
109
|
+
fs.cpSync(usersPublicDirectory, astroPublicDir, { recursive: true });
|
|
110
|
+
}
|
|
111
|
+
|
|
103
112
|
// Copy all the event files over
|
|
104
113
|
await copyFiles({
|
|
105
114
|
source,
|
|
@@ -11,7 +11,6 @@ const catalogDir = join(__dirname, '../');
|
|
|
11
11
|
const projectDIR = join(__dirname, `../examples/${catalog}`);
|
|
12
12
|
|
|
13
13
|
fs.copyFileSync(join(projectDIR, 'eventcatalog.config.js'), join(catalogDir, 'eventcatalog.config.js'));
|
|
14
|
-
|
|
15
14
|
fs.copyFileSync(join(projectDIR, 'eventcatalog.styles.css'), join(catalogDir, 'eventcatalog.styles.css'));
|
|
16
15
|
|
|
17
16
|
execSync(
|
|
@@ -21,13 +21,19 @@ const navItems = [
|
|
|
21
21
|
}
|
|
22
22
|
];
|
|
23
23
|
|
|
24
|
+
const logo = {
|
|
25
|
+
src: catalog?.logo?.src || '/logo.png',
|
|
26
|
+
alt: catalog?.logo?.alt || 'Event Catalog',
|
|
27
|
+
text: catalog?.logo?.text || "EventCatalog"
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
---
|
|
25
31
|
<nav class="md:fixed top-0 w-full z-20 bg-white border-b border-gray-200 py-4 font-bold text-xl max-w-[70em]">
|
|
26
32
|
<div class="flex justify-between items-center">
|
|
27
33
|
<div class="w-1/3 flex space-x-2 items-center">
|
|
28
34
|
<a href={buildUrl('/docs')} class="flex space-x-2 items-center">
|
|
29
|
-
<img src={buildUrl(
|
|
30
|
-
<span class="hidden sm:inline-block text-[1em]">{
|
|
35
|
+
{logo.src && <img alt={logo.alt} src={buildUrl(logo.src, true)} class="w-8" />}
|
|
36
|
+
{logo.text && <span class="hidden sm:inline-block text-[1em]">{logo.text}</span>}
|
|
31
37
|
</a>
|
|
32
38
|
</div>
|
|
33
39
|
<div class="w-1/3 md:block hidden">
|