Skip to content

Commit ed92eaf

Browse files
committed
refactor(scripts): organize scripts into subdirectories
Reorganize scripts into logical subdirectories: - build/ - Build-related scripts (main, clean, externals, js) - fix/ - Post-build fix scripts (main, path-aliases, external-imports, etc.) - test/ - Test scripts (main, cover, filter) - validate/ - Validation scripts (dist-exports, esm-named-exports, etc.) Remove redundant prefixes (validate-*.mjs → *.mjs) and rename index.mjs to main.mjs. Update all script paths in package.json and fix rootPath calculations for nested scripts.
1 parent 460e619 commit ed92eaf

23 files changed

+241
-350
lines changed

scripts/babel/README.md

Lines changed: 0 additions & 298 deletions
This file was deleted.

scripts/clean.mjs renamed to scripts/build/clean.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ import { isQuiet } from '#socketsecurity/lib/argv/flags'
1313
import { getDefaultLogger } from '#socketsecurity/lib/logger'
1414
import { printHeader } from '#socketsecurity/lib/stdio/header'
1515

16-
import { parseArgs } from './utils/parse-args.mjs'
16+
import { parseArgs } from '../utils/parse-args.mjs'
1717

1818
const logger = getDefaultLogger()
1919

2020
const rootPath = path.resolve(
2121
path.dirname(fileURLToPath(import.meta.url)),
2222
'..',
23+
'..',
2324
)
2425

2526
/**

scripts/build-externals.mjs renamed to scripts/build/externals.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { isQuiet } from '#socketsecurity/lib/argv/flags'
1111
import { getDefaultLogger } from '#socketsecurity/lib/logger'
1212
import { pluralize } from '#socketsecurity/lib/words'
1313

14-
import { buildExternals } from './build-externals/orchestrator.mjs'
14+
import { buildExternals } from '../build-externals/orchestrator.mjs'
1515

1616
const logger = getDefaultLogger()
1717
const printCompletedHeader = title => console.log(colors.green(`✓ ${title}`))

scripts/build-js.mjs renamed to scripts/build/js.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
analyzeMetafile,
1010
buildConfig,
1111
watchConfig,
12-
} from '../.config/esbuild.config.mjs'
12+
} from '../../.config/esbuild.config.mjs'
1313
import { getDefaultLogger } from '#socketsecurity/lib/logger'
1414

1515
const logger = getDefaultLogger()

0 commit comments

Comments
 (0)