build-ts is an opinionated command-line interface (CLI) tool designed to streamline the building of Node.js applications, libraries (including React), and serverless functions (GCP/Firebase) written in TypeScript. It wraps popular tools like Rollup and ts-node, providing simplified commands for common build tasks. The current stable version is 17.1.6, with a rapid release cadence, often featuring daily patch updates to address dependencies and minor bug fixes. Key differentiators include automatic `console.log` removal during builds, optimized `package.json` generation for serverless functions, and distinct commands for different project types (`app`, `lib`, `functions`). While primarily a CLI, it also exposes a programmatic API for advanced usage within larger build systems, making it a versatile choice for TypeScript-centric projects seeking a consistent and opinionated build workflow.
npm install build-tsVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing a TypeScript project, creating a simple function, building it into a Node.js application, and running both the built output and the raw TypeScript file directly using `build-ts`.
Upgrade your Node.js environment to version 24 or higher. Use `nvm` or your preferred Node.js version manager.
Review the `build-ts` configuration options for disabling `console.log` removal if your application requires it. For debugging, consider using alternative logging mechanisms or conditional logging based on environment variables.
Carefully read the documentation for configuration options to customize `build-ts` behavior. If issues arise, try to simplify your project's build setup or adapt to the recommended `build-ts` structure before extensive customization.
When upgrading to a new major version, thoroughly test your build process and review the official release notes for any migration guides or breaking changes. Pinning minor versions (`~`) in your `package.json` can reduce unexpected build failures, but regular updates are recommended.
Update your Node.js environment to version 24 or higher. Use `nvm install 24 && nvm use 24` or similar version management tools.
Verify all dependencies are installed, check your `tsconfig.json` for correct `paths` and `baseUrl` settings, and ensure that any custom Rollup plugins are compatible with `build-ts`'s internal Rollup version and configuration.
If you are customizing Rollup plugins via `build-ts` configuration, ensure that `@rollup/plugin-commonjs` is placed *after* other transformation plugins (like `@rollup/plugin-typescript` or `@rollup/plugin-babel`).
No dependency data recorded yet.