A Node.js utility that reads bower.json and returns an array of main files from Bower dependencies.
main-bower-files is a Node.js utility that automates the inclusion of Bower package main files into build processes. It solves the problem of manually tracking and specifying which files from Bower dependencies (like jQuery, Bootstrap, etc.) should be copied, concatenated, or processed during frontend builds. By reading bower.json files, it returns an array of file paths ready for use in tools like Gulp or Grunt.
Frontend developers and build engineers using Bower for dependency management and task runners like Gulp or Grunt for their build pipelines.
Developers choose main-bower-files because it eliminates manual file path maintenance, reduces configuration errors, and seamlessly integrates with popular build tools. Its override system and environment-aware file selection provide flexibility without sacrificing automation.
Getting all main bower files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Reads bower.json to automatically include main files from all dependencies, eliminating manual path specification and reducing configuration errors.
Provides clear examples and direct support for both Gulp and Grunt, making it easy to integrate into existing asset pipelines without extra plugins.
Allows per-package overrides for main files, dependencies, and ignoring packages directly in bower.json, offering customization without modifying node_modules.
Supports selecting different files (e.g., minified vs. debug) based on NODE_ENV, enabling optimized builds for development or production environments.
Bower is no longer actively maintained by many, making this tool irrelevant for modern projects using npm, Yarn, or other package managers.
Requires explicit base path configuration in Gulp to avoid flat file structures, as noted in the README, adding complexity to setup.
Primarily supports Gulp and Grunt, with no native integration for newer bundlers like Webpack, restricting its use in contemporary workflows.