mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
stlye: pretty please (#124)
Co-authored-by: EvolutionX-10 <EvolutionX-10@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
82637245f3
commit
ff5c161469
@@ -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' }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user