This module manages the installed packages using Bower. Note that npm, git and bower must be installed for this module to be available.
salt.modules.bower.
install
(pkg, dir, pkgs=None, runas=None, env=None)¶Install a Bower package.
If no package is specified, the dependencies (from bower.json) of the package in the given directory will be installed.
A package name in any format accepted by Bower, including a version identifier
The target directory in which to install the package
A list of package names in the same format as the pkg
parameter
The user to run Bower with
Environment variables to set when invoking Bower. Uses the same env
format as the cmd.run
execution
function.
CLI Example:
salt '*' bower.install underscore /path/to/project
salt '*' bower.install jquery#2.0 /path/to/project
salt.modules.bower.
list_
(dir, runas=None, env=None)¶List installed Bower packages.
The directory whose packages will be listed
The user to run Bower with
Environment variables to set when invoking Bower. Uses the same env
format as the cmd.run
execution
function.
CLI Example:
salt '*' bower.list /path/to/project
salt.modules.bower.
prune
(dir, runas=None, env=None)¶New in version 2017.7.0.
Remove extraneous local Bower packages, i.e. those not referenced in bower.json
The directory whose packages will be pruned
The user to run Bower with
Environment variables to set when invoking Bower. Uses the same env
format as the cmd.run
execution
function.
CLI Example:
salt '*' bower.prune /path/to/project
salt.modules.bower.
uninstall
(pkg, dir, runas=None, env=None)¶Uninstall a Bower package.
A package name in any format accepted by Bower
The target directory from which to uninstall the package
The user to run Bower with
Environment variables to set when invoking Bower. Uses the same env
format as the cmd.run
execution
function.
CLI Example:
salt '*' bower.uninstall underscore /path/to/project