moving json schema out of extension-registry

This commit is contained in:
Niels Lyngsø
2024-09-14 22:30:10 +02:00
parent 51d7df306f
commit c69f30c3c8
5 changed files with 142 additions and 25 deletions

View File

@@ -0,0 +1,23 @@
import { writeFileSync } from 'fs';
import { format, resolveConfig } from 'prettier';
import { createImportMap } from '../importmap/index.js';
const tsPath = './src/all-packages.ts';
const importmap = createImportMap({
rootDir: './src',
replaceModuleExtensions: true,
});
const paths = Object.keys(importmap.imports);
const content = `
${
paths.map(path => `import '${path}';`).join('\n')
}
`;
//const config = await resolveConfig('./.prettierrc.json');
//const formattedContent = await format(content, { ...config, parser: 'json' });
writeFileSync(tsPath, content);