ChemInfo Build Tool

1.3.2 · active · verified Tue Apr 21

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

npm install -D cheminfo-build

// Example package.json with a custom build script
// This demonstrates how to integrate cheminfo-build into a typical project workflow.
// {
//   "name": "my-cheminfo-package",
//   "version": "1.0.0",
//   "main": "dist/my-cheminfo-package.umd.cjs",
//   "module": "dist/my-cheminfo-package.esm.mjs",
//   "exports": {
//     ".": {
//       "import": "./dist/my-cheminfo-package.esm.mjs",
//       "require": "./dist/my-cheminfo-package.umd.cjs"
//     }
//   },
//   "scripts": {
//     "build": "cheminfo-build -e src/index.js -o dist -n my-cheminfo-package --no-source-map"
//   }
// }

// To execute the build command defined in package.json:
// In your terminal:
// npm run build

// Or, for direct CLI execution without a package.json script:
// npx cheminfo-build -e src/index.js -o dist -n my-cheminfo-package --no-minify

view raw JSON →