Skip to content

Commit 5678028

Browse files
committed
chore: fix site
1 parent 17a460b commit 5678028

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

docs-svelte-kit/shim/fs.mjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/* eslint require-jsdoc:0 -- shim */
2+
function existsSync() {
3+
return false;
4+
}
25

3-
export {};
4-
export default {};
6+
export { existsSync };
7+
export default { existsSync };

docs-svelte-kit/shim/path.mjs

+11-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ function extname(p) {
88
return /\.[\w$-]+$/iu.exec(p)[0];
99
}
1010

11+
function basename(p, ext) {
12+
const nm = p.split('/').slice(-1)[0];
13+
if (!ext) {
14+
return nm;
15+
}
16+
return nm.endsWith(ext) ? nm.slice(0, -ext.length) : nm;
17+
}
18+
1119
function relative(s) {
1220
return s;
1321
}
@@ -47,8 +55,9 @@ const posix = {
4755
sep,
4856
isAbsolute,
4957
join,
50-
normalize
58+
normalize,
59+
basename
5160
};
5261
posix.posix = posix;
53-
export { dirname, extname, posix, resolve, relative, sep, isAbsolute, join, normalize };
62+
export { dirname, extname, posix, resolve, relative, sep, isAbsolute, join, normalize, basename };
5463
export default posix;

0 commit comments

Comments
 (0)