Registry / devops / wiredep-cli

wiredep-cli

JSON →
library0.1.0jsnpmunverified

This package, `wiredep-cli`, provides a command-line interface for `wiredep`, a tool designed to automatically inject Bower front-end dependencies into HTML, CSS, and JS files. Its primary function was to automate the inclusion of `<script>` and `<link>` tags based on the `bower.json` manifest. The package, version 0.1.0, and its core dependency `wiredep` (version 0.11.0) were both last updated in March 2016. Given that Bower itself has been officially deprecated since 2017 in favor of modern front-end package managers like npm/Yarn and build tools like Webpack, `wiredep-cli` is no longer actively maintained or relevant for contemporary web development workflows. This tool is part of an abandoned ecosystem.

npm install wiredep-cli
INSTALL
IMPORT
SIG · WIREDEP-CLI
W
wiredep-cli
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Demonstrates global installation of wiredep-cli and wiredep, initializing Bower, installing a package, and then using `wiredep` command to inject it into an HTML file.

npm install -g wiredep-cli npm install -g wiredep # wiredep is often installed globally for CLI use with wiredep-cli bower init --yes # Initialize a bower.json if not present bower install jquery --save # Install a sample Bower package # Create a dummy HTML file cat > index.html << EOF <!doctype html> <html> <head> <!-- bower:css --> <!-- endbower --> </head> <body> <!-- bower:js --> <!-- endbower --> <p>Hello from Wiredep!</p> </body> </html> EOF # Run wiredep-cli to inject dependencies wiredep --src index.html cat index.html # View the updated HTML with injected scripts
wiredep --version
Debug
Known issues
breakingThe entire Bower package manager ecosystem, which `wiredep-cli` relies upon, has been officially deprecated since 2017. Modern front-end development has moved to npm/Yarn/pnpm for package management and Webpack/Rollup/Vite for bundling.
fix
Migrate your project from Bower to a modern package manager (npm, Yarn, pnpm) and a module bundler (Webpack, Rollup, Vite). Manually manage script/link tags or use a build tool plugin for injection.
affects: >=0.1.0
gotcha`wiredep-cli` and its core `wiredep` library have not been updated since March 2016. This means they are unmaintained and may not work with newer versions of Node.js, npm, or contemporary browser features.
fix
Avoid using this package for new projects. For existing projects, consider a full migration to modern tools as outlined in the previous warning.
affects: >=0.1.0
gotchaThe `wiredep` tool (and thus `wiredep-cli`) expects specific `<!-- bower:js -->` and `<!-- endbower -->` HTML comments to identify injection points. Incorrectly placed or missing comments will prevent dependencies from being injected.
fix
Ensure your HTML, CSS, or JS files contain the correct Bower injection placeholders as specified in the `wiredep` documentation.
affects: >=0.1.0
gotchaPackages must be saved as Bower `dependencies` (using `bower install --save`) to be injected by `wiredep` by default. `devDependencies` are typically ignored unless explicitly configured.
fix
Always use `bower install --save <package-name>` when installing front-end components intended for injection. Alternatively, configure `wiredep` to include `devDependencies`.
affects: >=0.1.0
Errors
Common errors & fixes
wiredep command not found
The `wiredep` CLI tool (which `wiredep-cli` wraps or works in conjunction with) is not installed globally or is not in the system's PATH.
fix
Install `wiredep` globally: `npm install -g wiredep`. Also ensure `wiredep-cli` is installed: `npm install -g wiredep-cli`.
Bower components not being injected into HTML/CSS.
This can be due to incorrect paths to `bower.json` or the Bower components directory, missing `main` fields in `bower.json` of dependencies, or improper `<!-- bower:type -->` comments.
fix
Verify `--bowerJson` and `--directory` options point to the correct locations. Check `bower.json` files for missing `main` entries and use `overrides` if necessary. Ensure correct HTML/CSS comment blocks exist for injection. Run `bower install` to ensure components are present.
Error: Cannot find module 'wiredep'
Although `wiredep-cli` is a CLI, if `wiredep` itself is invoked programmatically (e.g., in a Gulp/Grunt task), this error indicates `wiredep` is not installed as a local dependency.
fix
Install `wiredep` locally as a dependency: `npm install --save-dev wiredep`.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
wiredeprequiredThis package is a CLI wrapper for the `wiredep` library, which performs the actual dependency injection. `wiredep` itself is also unmaintained.
Agent activity
15 hits · last 30 days
node
14
Resources
wiredep-cli — npm install wiredep-cli · libregistry