Skip to content

Commit cf0f244

Browse files
committed
chore: oops
1 parent 85535dc commit cf0f244

File tree

5 files changed

+78
-1
lines changed

5 files changed

+78
-1
lines changed

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 22.17.1

.vscode/launch.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Debug CLI Generate",
11+
"skipFiles": ["<node_internals>/**"],
12+
"program": "${workspaceFolder}/bin/cli.mjs",
13+
"args": [
14+
"generate",
15+
"-i",
16+
"/Users/araujogui/Projects/node/doc/api/test.md",
17+
"-t",
18+
"web",
19+
"-o",
20+
"out/"
21+
],
22+
"console": "integratedTerminal",
23+
"env": {
24+
"NODE_OPTIONS": "--inspect"
25+
}
26+
}
27+
]
28+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:update-snapshots": "node --test --experimental-test-module-mocks --test-update-snapshots",
1717
"test:watch": "node --test --experimental-test-module-mocks --watch",
1818
"prepare": "husky",
19-
"run": "node bin/cli.mjs ",
19+
"run": "node bin/cli.mjs",
2020
"watch": "node --watch bin/cli.mjs"
2121
},
2222
"main": "./src/index.mjs",
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Node.js docs</title>
7+
<link rel="stylesheet" href="styles.css" />
8+
9+
<link rel="preconnect" href="https://fonts.googleapis.com" />
10+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
11+
12+
<link
13+
rel="stylesheet"
14+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=Open+Sans:ital,wght@0,300..800;1,300..800"
15+
/>
16+
17+
<!-- Apply theme before paint to avoid Flash of Unstyled Content -->
18+
<script>
19+
document.documentElement.setAttribute(
20+
'data-theme',
21+
localStorage.getItem('theme') ||
22+
(matchMedia('(prefers-color-scheme: dark)').matches
23+
? 'dark'
24+
: 'light')
25+
);
26+
</script>
27+
</head>
28+
29+
<body>
30+
<div id="root"></div>
31+
<script>
32+
console.log(&#39;hello, world&#39;);
33+
</script>
34+
</body>
35+
</html>

test.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { readFileSync } from 'node:fs';
2+
3+
import Mustache from 'mustache';
4+
5+
const template = readFileSync('src/generators/web/template.html', 'utf-8');
6+
7+
const renderedHtml = Mustache.render(template, {
8+
title: `Node.js docs`,
9+
dehydrated: '',
10+
clientBundleJs: `console.log('hello, world');`,
11+
});
12+
13+
console.log(renderedHtml);

0 commit comments

Comments
 (0)