puppeteer/tools/generate_module_package_json.ts
2024-01-03 10:11:33 +00:00

16 lines
371 B
TypeScript

/**
* @license
* Copyright 2022 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import {mkdirSync, writeFileSync} from 'fs';
import {dirname} from 'path';
/**
* Outputs the dummy package.json file to the path specified
* by the first argument.
*/
mkdirSync(dirname(process.argv[2]), {recursive: true});
writeFileSync(process.argv[2], `{"type": "module"}`);