UNPKG

519 BPlain TextView Raw
1import { log } from './common';
2import { savePackage } from '../lib/ts/savePackage';
3import { fs } from '@platform/fs';
4
5/**
6 * SCRIPT
7 *
8 * Copy common fields from [package.json] as constants
9 * to a default target location as a [.ts] file.
10 *
11 */
12(async () => {
13 const source = fs.resolve('package.json');
14 const target = fs.resolve('src/common/constants.pkg.ts');
15 await savePackage({ fs, source, target });
16
17 log.info.green('\nSaved [package.json] constants to:');
18 log.info.gray(` ${target}\n`);
19})();