salt.modules.bower#
Manage and query Bower packages#
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.
- pkg
A package name in any format accepted by Bower, including a version identifier
- dir
The target directory in which to install the package
- pkgs
A list of package names in the same format as the
pkgparameter- runas
The user to run Bower with
- env
Environment variables to set when invoking Bower. Uses the same
envformat as thecmd.runexecution 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.
- dir
The directory whose packages will be listed
- runas
The user to run Bower with
- env
Environment variables to set when invoking Bower. Uses the same
envformat as thecmd.runexecution 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
- dir
The directory whose packages will be pruned
- runas
The user to run Bower with
- env
Environment variables to set when invoking Bower. Uses the same
envformat as thecmd.runexecution function.
CLI Example:
salt '*' bower.prune /path/to/project
- salt.modules.bower.uninstall(pkg, dir, runas=None, env=None)#
Uninstall a Bower package.
- pkg
A package name in any format accepted by Bower
- dir
The target directory from which to uninstall the package
- runas
The user to run Bower with
- env
Environment variables to set when invoking Bower. Uses the same
envformat as thecmd.runexecution function.
CLI Example:
salt '*' bower.uninstall underscore /path/to/project