stlye: pretty please (#124)

Co-authored-by: EvolutionX-10 <EvolutionX-10@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2022-08-29 07:12:33 +05:30
committed by GitHub
parent 82637245f3
commit ff5c161469
14 changed files with 4926 additions and 4923 deletions

View File

@@ -1,15 +1,13 @@
import { writeFile } from 'fs/promises'
import { writeFile } from 'fs/promises';
import { join } from 'path';
// A quick script to regenerate package.jsons for each cjs and esm after tsup cleans distributions
const locations = process.argv;
locations.shift();
locations.shift();
for(const loc of locations) {
if(loc.endsWith('cjs')) {
await writeFile(join(loc, 'package.json'), JSON.stringify({ type : 'commonjs' }))
for (const loc of locations) {
if (loc.endsWith('cjs')) {
await writeFile(join(loc, 'package.json'), JSON.stringify({ type: 'commonjs' }));
} else {
await writeFile(join(loc, 'package.json'), JSON.stringify({ type : 'module' }))
await writeFile(join(loc, 'package.json'), JSON.stringify({ type: 'module' }));
}
}