cheminfo-build is a specialized Command Line Interface (CLI) tool designed to streamline the build process for packages within the ChemInfo ecosystem. It automates common tasks such as bundling JavaScript for various environments (ESM, UMD), generating source maps, and creating minified versions. The package is currently at version 1.3.2 and receives regular updates, primarily for dependency management and minor fixes, with major breaking changes occurring less frequently. For example, v1.3.0 introduced significant changes to module resolution and bundle extensions. Its key differentiators include its focus on ChemInfo package conventions and its ability to handle modern JavaScript module formats (ESM, CJS) with configurable output paths and naming conventions.
npm install cheminfo-buildVerified import paths — ran on the pinned version, not inferred.
Demonstrates installation and basic CLI usage of cheminfo-build within a project's `package.json` scripts, including options for entry, output, name, and disabling features like source maps or minification.
Review and update your `package.json`'s `exports` field to correctly define module entry points for both CommonJS (`require`) and ESM (`import`) environments. Any build scripts, bundler configurations, or direct import paths that relied on the old `.js` extensions for UMD bundles must be updated to use the new `.umd.cjs` or `.esm.mjs` extensions. Prioritize `package.json` `exports` for robust module resolution over direct file paths.
Regularly update `cheminfo-build` to its latest patch version (e.g., `npm update cheminfo-build`). Always test your build process after updating, especially within CI/CD pipelines, to catch any unexpected behavior. Consider pinning to a major version (`^1.x.x`) to prevent automatic major version upgrades that could introduce unannounced breaking changes.
Ensure `cheminfo-build` is installed as a dependency (`npm install cheminfo-build` or `npm install -D cheminfo-build`). For programmatic use, rely on standard module imports like `import { build } from 'cheminfo-build'` or `const { build } = require('cheminfo-build')`, which correctly utilize `package.json`'s `exports` field for resolution, rather than hardcoding paths to `dist` files.Execute the command using `npx cheminfo-build <options>` to leverage the locally installed version from your project's `node_modules`. Alternatively, ensure `node_modules/.bin` is included in your system's PATH, or call the executable directly from `node_modules/.bin/cheminfo-build`.
No dependency data recorded yet.