Father is a comprehensive NPM package development tool within the UmiJS ecosystem, designed to streamline the building, generating, and publishing of JavaScript and TypeScript packages. It features a dual-mode build system: 'Bundless' for ESModule and CommonJS outputs, leveraging esbuild, Babel, or SWC; and 'Bundle' for UMD artifacts powered by Webpack. The package, currently at version 4.6.18, maintains an active release cadence with frequent minor updates and patches. Its key differentiators include robust type generation for TypeScript, persistent caching for accelerated builds, and integrated project health checks to prevent common development pitfalls. Father also offers micro-generators for common engineering tasks and experimental dependency pre-bundling to enhance stability in Node.js frameworks and libraries.
npm install fatherVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up a basic TypeScript package with Father, including configuration for ESModule and CommonJS outputs, and a build script.
Refer to the official 'upgrading.md' guide (linked in the README) for detailed migration steps, focusing on configuration file changes and new build options.
Carefully review the `esm`, `cjs`, and `umd` configuration options in `father.config.ts`. Ensure `type` and `platform` settings match your target environment and module format requirements.
If encountering unexpected build results, try clearing the Father cache by deleting the `.father` directory in your project root, or running `father build --clean` if available (check CLI options).
Run `npm install father` or `pnpm install father` or `yarn add father` in your project's root directory. Ensure it's listed in `devDependencies`.
Review your `father.config.ts` against the official documentation and the type definitions (`IFatherConfig`, `IBundlessConfig`, etc.) for any incorrect or missing properties. Your IDE should provide type hints.
Either remove the `output` property from the `esm` or `cjs` configuration block, or disable `auto` if you intend to specify custom output paths manually.
No dependency data recorded yet.