Skip to content

Commit 11bbb35

Browse files
committed
chore: allow running pre-build without SHA target
1 parent b95448d commit 11bbb35

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docusaurus.config.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import fs from 'fs';
2-
import path from 'path';
1+
import fs from 'node:fs';
2+
import path from 'node:path';
33

4+
import logger from '@docusaurus/logger';
45
import { Config } from '@docusaurus/types';
56
import npm2yarn from '@docusaurus/remark-plugin-npm2yarn';
67
import { themes as prismThemes } from 'prism-react-renderer';
@@ -25,7 +26,7 @@ try {
2526
'utf-8'
2627
);
2728
} catch {
28-
console.warn('No .sha file found in docs/latest directory');
29+
logger.warn('No .sha file found in docs/latest directory');
2930
}
3031

3132
const config: Config = {

scripts/pre-build.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ const start = async (source: string): Promise<void> => {
5353
destination: DOCS_FOLDER,
5454
downloadMatch: '/docs/',
5555
});
56-
57-
await fs.writeFile(path.join(DOCS_FOLDER, '.sha'), source);
56+
await fs.writeFile(path.join(DOCS_FOLDER, '.sha'), target);
5857
} else if (existsSync(source)) {
5958
await copy({
6059
target: source,

0 commit comments

Comments
 (0)