On this page
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.
-
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
pkg
parameter - runas
-
The user to run Bower with
- env
-
Environment variables to set when invoking Bower. Uses the same
env
format as thecmd.run
execution function.
CLI Example:
salt '*' bower.install underscore /path/to/project salt '*' bower.install jquery#2.0 /path/to/project
salt.modules.bower.install(pkg, dir, pkgs=None, 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
env
format as thecmd.run
execution function.
CLI Example:
salt '*' bower.list /path/to/project
salt.modules.bower.list_(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
env
format as thecmd.run
execution function.
CLI Example:
salt '*' bower.prune /path/to/project
salt.modules.bower.prune(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
env
format as thecmd.run
execution function.
CLI Example:
salt '*' bower.uninstall underscore /path/to/project
salt.modules.bower.uninstall(pkg, dir, runas=None, env=None)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.bower.html