The `js-build-info-generator` package provides a straightforward command-line interface (CLI) tool designed to generate a JSON file containing essential build-time information. This utility is primarily intended for integration into CI/CD pipelines, allowing developers to automatically capture metadata such as the commit SHA, build version/tag, the exact build timestamp (ISO 8601 format), a custom comment, and the author who triggered the build. The current stable version is 1.0.3, last updated several years ago, indicating a mature and stable, albeit minimally maintained, codebase that fulfills its specific purpose without requiring frequent updates. Its core differentiation lies in its simplicity; it operates purely via command-line arguments, requiring no configuration files, making it easy to integrate into various build environments like Dockerfiles or GitLab CI stages. The output is a simple, predictable JSON object, making it easily consumable by other applications for displaying build provenance or debugging.
npm install js-build-info-generatorNo compatibility data collected yet for this library.
Demonstrates how to generate a build info JSON file with various parameters specifying commit SHA, build version, comment, and author, outputting to a specified file path, typically used in CI/CD.
Use `npx generate-build-info ...` or `npm install -g js-build-info-generator`.
Ensure the target directory for the output file exists before running the command, e.g., `mkdir -p ./public && npx generate-build-info --file ./public/build-info.json ...`.
Consider adding a check for file existence before running the command, or ensure the output directory is ephemeral in CI/CD pipelines.
Run `npm install -g js-build-info-generator` to install globally, or `npx generate-build-info ...` to execute it from `node_modules`.
Create the target directory before running the command: `mkdir -p ./non/existent/dir && npx generate-build-info --file ./non/existent/dir/build-info.json ...`
No dependency data recorded yet.