@3sln/deck 0.0.12 → 0.0.13
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/bin/build.js +18 -6
- package/package.json +1 -1
- package/src/config.js +1 -1
package/bin/build.js
CHANGED
|
@@ -89,14 +89,26 @@ async function build() {
|
|
|
89
89
|
}));
|
|
90
90
|
console.log(`Found and processed ${initialCardsData.length} cards.`);
|
|
91
91
|
|
|
92
|
-
// Generate agents.
|
|
93
|
-
console.log('Generating agents.
|
|
94
|
-
let
|
|
92
|
+
// Generate agents.html
|
|
93
|
+
console.log('Generating agents.html...');
|
|
94
|
+
let agentsHtml = `<!doctype html>
|
|
95
|
+
<html>
|
|
96
|
+
<head>
|
|
97
|
+
<title>Agents Index</title>
|
|
98
|
+
</head>
|
|
99
|
+
<body>
|
|
100
|
+
<h1>Agents Index</h1>
|
|
101
|
+
<p>This file is meant to help LLMs find documentation. Below is a list of available cards.</p>
|
|
102
|
+
<ul>
|
|
103
|
+
`;
|
|
95
104
|
for (const card of initialCardsData) {
|
|
96
|
-
|
|
105
|
+
agentsHtml += ` <li><a href="${card.path}">${card.title}</a></li>\n`;
|
|
97
106
|
}
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
agentsHtml += ` </ul>
|
|
108
|
+
</body>
|
|
109
|
+
</html>`;
|
|
110
|
+
await fs.writeFile(path.resolve(outDir, 'agents.html'), agentsHtml);
|
|
111
|
+
console.log('agents.html generated.');
|
|
100
112
|
|
|
101
113
|
// Generate asset manifest for service worker
|
|
102
114
|
console.log('Generating asset manifest...');
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -116,7 +116,7 @@ export function getHtmlTemplate({ title, importMap, initialCardsData, pinnedCard
|
|
|
116
116
|
<body>
|
|
117
117
|
<div id="root"></div>
|
|
118
118
|
<div style="display: none;" aria-hidden="true">
|
|
119
|
-
This is a Single Page Application. Agents should look at the <a href="/agents.
|
|
119
|
+
This is a Single Page Application. Agents should look at the <a href="/agents.html">agents.html</a> file for documentation they can read easily.
|
|
120
120
|
</div>
|
|
121
121
|
<script type="module">
|
|
122
122
|
import { renderDeck } from '${entryFile}';
|