UNPKG

disassemble-package

Version:

Separate the config contained in package.json into a file.

9 lines 341 B
import { writeFile } from 'fs/promises'; import { join } from 'path'; export const disassembleBabel = async (path, json, { space }) => { if (json.hasOwnProperty('babel')) { await writeFile(join(path, '.babelrc'), JSON.stringify(json.babel, undefined, space)); delete json.babel; } }; //# sourceMappingURL=babel.js.map