* feat(docusaurus-adapter): Support docsearch key and adapter docs * chore(release): include docusaurus adapter in shipjs publish list * chore(docusaurus-adapter): remove libtmp and pin initial version * fix: issue with footer * fix: contextuals * fix all ts errors * fix: lint * fix lint
16 lines
414 B
JavaScript
16 lines
414 B
JavaScript
import { execSync } from 'node:child_process';
|
|
|
|
import { glob } from 'glob';
|
|
|
|
const pattern = 'lib/theme/**/*.js';
|
|
const files = glob.sync(pattern);
|
|
|
|
if (files.length > 0) {
|
|
try {
|
|
execSync(`prettier --config ../../.prettierrc --write "${pattern}"`, {
|
|
stdio: 'inherit',
|
|
});
|
|
} catch (error) {
|
|
throw new Error(`Prettier failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
}
|
|
}
|