mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
* chore: fix tsc predicate type checking * build: add tsup as bundler * chore: revert text * chore: fix predicates.ts, update dependencies, bump version * docs: update example * build: update dependencies * fix: crash on collectors (#89) * fix: crash on collectors * feat: bump version for bug fix * fix: crash on collectors pt * docs: adding some documentation for docasaurus * docs: add errors.ts comments * docs: refactor comments * docs: adding examples * feat: refresh package-lock.json * refactor: destructure and clean namespaces * feat: add regen package.json script * feat: add tsup, remove tsc, add scripts * feat: update ts-results import style * feat: readd typescript because idk if i should * feat: breakup tsconfigs and add tsup config * feat: add esm json tsconfig to git * build: update dependencies and move to ts-result-es * feat: remove unused function * feat: update ts-results for esm/cjs interop! * revert: remove version.txt * build: goodbye tsc, hello tsup * build: moving discord.js as dev dependency * style: requested changes * feat: add tsc back ( i missed you ) * build: bump version -> 1.0.0 * feat: syncing to main * style: pretty * feat: fix tsconfig issues with tsup * revert: remove ExternallyUsed * feat: update scripts * build: update tsup and pkg-lock.json * feat: refresh package-lock.json * feat: test
16 lines
499 B
JavaScript
16 lines
499 B
JavaScript
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' }))
|
|
} else {
|
|
await writeFile(join(loc, 'package.json'), JSON.stringify({ type : 'module' }))
|
|
}
|
|
}
|
|
|
|
|