alina sireneva
64da48926f
- improved bun support - deno support - use antfu/eslint-config - fixed some issues - removed pre-commit hooks
11 lines
377 B
JavaScript
11 lines
377 B
JavaScript
import * as fs from 'fs'
|
|
|
|
const packageJson = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url)))
|
|
|
|
const importMap = {}
|
|
|
|
for (const [name, version] of Object.entries(packageJson.dependencies)) {
|
|
importMap[name] = `npm:${name}@${version}`
|
|
}
|
|
|
|
fs.writeFileSync(new URL('import-map.json', import.meta.url), JSON.stringify({ imports: importMap }, null, 2))
|