Code postprocessing utility, a thin abstraction layer over evolving toolsets.
Usage: npx codeshape [...space-separated entry points] [...--flags]
Default entry point: ./index.ts
Performed tasks:
- Typecheck (with
tsgofrom@typescript/native-preview)- use
--no-typecheckto skip this task - use
--typecheck-onlyto skip other tasks
- use
- Lint + format (with
@biomejs/biome)- use
--no-lint-formatto skip this task - use
--lint-format-onlyto skip other tasks - use
--no-committo skip the fix commit - use
-m <message>to set a fix commit message (default:lint) - use
--vcs-disabledto opt out from using.gitignore
- use
- Compile (with
tsdown)- use
--no-compileto skip this task - use
--compile-onlyto skip other tasks - use
--no-dtsto skip emitting a type declaration file - use
--compile-input <...space-separated paths>(default:./index.ts) and--compile-output <path>(default:./dist) to set an entry point and an output directory - use
--compile-platformto set a target platform (default:node, other options:browser,neutral) - use
--tsconfig <path>to point to a custom TS config file
- use
Use --check to run only the checking tasks: typecheck, lint + format.
Example 1: npx codeshape runs typechecking, linting, formatting, adding a fix commit if needed, compiling ./index.ts to ./dist/index.mjs and ./dist/index.cjs, emitting type declarations to ./dist/index.d.ts.
Example 2: npx codeshape --check runs typechecking, linting, formatting, adding a fix commit if needed.