Bower and devDependencies vs dependencies
devDependencies
are for the development-related scripts, e.g. unit testing, packaging scripts, documentation generation, etc.
dependencies
are required for production use, and assumed required for dev as well.
Including devDependencies
within dependencies
, as you have it, won't be harmful; the module will just bundle more files (bytes) during the install - consuming more (unnecessary) resources. From a purist POV, these extra bytes could be detrimental, just depends on your perspective.
To shed some light, looking at bower help install
, modules listed under devDependencies
can be omitted during the module installation via -p
or --production
, e.g.:
bower install angular-latest --production
This is the recommended way to perform an installation for anything other than a development platform.
On the contrary, there is no way to omit modules listed under dependencies
.
As of [email protected] (see bower latest source), bower help
yields:
Usage:
bower <command> [<args>] [<options>]
Commands:
cache Manage bower cache
help Display help information about Bower
home Opens a package homepage into your favorite browser
info Info of a particular package
init Interactively create a bower.json file
install Install a package locally
link Symlink a package folder
list List local packages
lookup Look up a package URL by name
prune Removes local extraneous packages
register Register a package
search Search for a package by name
update Update a local package
uninstall Remove a local package
Options:
-f, --force Makes various commands more forceful
-j, --json Output consumable JSON
-l, --log-level What level of logs to report
-o, --offline Do not hit the network
-q, --quiet Only output important information
-s, --silent Do not output anything, besides errors
-V, --verbose Makes output more verbose
--allow-root Allows running commands as root
See 'bower help <command>' for more information on a specific command.
and further, bower help install
yields (see latest source):
Usage:
bower install [<options>]
bower install <endpoint> [<endpoint> ..] [<options>]
Options:
-F, --force-latest Force latest version on conflict
-h, --help Show this help message
-p, --production Do not install project devDependencies
-S, --save Save installed packages into the project's bower.json dependencies
-D, --save-dev Save installed packages into the project's bower.json devDependencies
Additionally all global options listed in 'bower help' are available
Description:
Installs the project dependencies or a specific set of endpoints.
Endpoints can have multiple forms:
- <source>
- <source>#<target>
- <name>=<source>#<target>
Where:
- <source> is a package URL, physical location or registry name
- <target> is a valid range, commit, branch, etc.
- <name> is the name it should have locally.