salt.states.bower
Installation of Bower Packages
These states manage the installed packages using Bower. Note that npm, git and bower must be installed for these states to be available, so bower states should include requisites to pkg.installed states for the packages which provide npm and git (simply npm
and git
in most cases), and npm.installed state for the package which provides bower.
Example:
npm: pkg.installed git: pkg.installed bower: npm.installed require: - pkg: npm - pkg: git underscore: bower.installed: - dir: /path/to/project - require: - npm: bower
-
Bootstraps a frontend distribution.
Will execute 'bower install' on the specified directory.
- user
-
The user to run Bower with
salt.states.bower.bootstrap(name, user=None)
-
Verify that the given package is installed and is at the correct version (if specified).
underscore: bower.installed: - dir: /path/to/project - user: someuser jquery#2.0: bower.installed: - dir: /path/to/project
- name
-
The package to install
- dir
-
The target directory in which to install the package
- pkgs
-
A list of packages to install with a single Bower invocation; specifying this argument will ignore the
name
argument - user
-
The user to run Bower with
- env
-
A list of environment variables to be set prior to execution. The format is the same as the
cmd.run
. state function.
salt.states.bower.installed(name, dir, pkgs=None, user=None, env=None)
-
New in version 2017.7.0.
Cleans up local bower_components directory.
Will execute 'bower prune' on the specified directory (param: name)
- user
-
The user to run Bower with
salt.states.bower.pruned(name, user=None, env=None)
-
Verify that the given package is not installed.
- dir
-
The target directory in which to install the package
- user
-
The user to run Bower with
salt.states.bower.removed(name, dir, user=None)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.bower.html