%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/bower.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
mZddlm
Zeje�Zidd6Zd�Zd	�Zd
�Zdddd�Zddd�Zddd
�Zddd�ZdS(u�
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.

i(tabsolute_importtprint_functiontunicode_literalsN(tCommandExecutionError(tLooseVersionulistulist_cC@s)tjjjd�dkr%tdfStS(u+
    Only work when Bower is installed
    uboweru=The bower module could not be loaded: bower command not foundN(tsalttutilstpathtwhichtNonetFalsetTrue(((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pyt__virtual__ s
cC@sMttdd��}td�}||krItdj||���ndS(uw
    Check the version of Bower to ensure this module will work. Currently
    bower must be at least version 1.3.
    ucmd.runubower --versionu1.3u8'bower' is not recent enough({0} < {1}). Please Upgrade.N(t
_LooseVersiont__salt__Rtformat(t
bower_versiont
valid_version((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pyt_check_valid_version)scC@sN|std��ndgtj|�}|jddddddg�|S(u*
    Create bower command line string
    u.bower_command, e.g. install, must be specifieduboweru--config.analyticsufalseu--config.interactiveu--allow-rootu--json(Rtshlextsplittextend(t
bower_commandtcmd((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pyt_construct_bower_command<s
c
C@s�t�td�}|r)|j|�n|r?|j|�ntd|d|d|d|dt�}|ddkr�t|d	��ntjj	j
|d
�}|ikS(u2
    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 the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution
        function.

    CLI Example:

    .. code-block:: bash

        salt '*' bower.install underscore /path/to/project

        salt '*' bower.install jquery#2.0 /path/to/project

    uinstallucmd.run_alltcwdtrunastenvtpython_shelluretcodeiustderrustdout(RRtappendRRR
RRRtjsontloads(tpkgtdirtpkgsRRRtresulttstdout((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pytinstallKs&
	c
C@s�t�td�}|j|�td|d|d|d|dt�}|ddkrkt|d	��ntjjj	|d
�}|ikS(u
    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 the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution
        function.


    CLI Example:

    .. code-block:: bash

        salt '*' bower.uninstall underscore /path/to/project

    u	uninstallucmd.run_allRRRRuretcodeiustderrustdout(
RRRRR
RRRRR(R R!RRRR#R$((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pyt	uninstall�s

	c
C@s�t�td�}|jd�td|d|d|d|dt�}|dd	krkt|d
��ntjjj	|d�dS(
u�
    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 the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution
        function.

    CLI Example:

    .. code-block:: bash

        salt '*' bower.list /path/to/project

    ulistu	--offlineucmd.run_allRRRRuretcodeiustderrustdoutudependencies(
RRRRR
RRRRR(R!RRRR#((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pytlist_�s

	c
C@sut�td�}td|d|d|d|dt�}|ddkr^t|d	��ntjjj|d
�S(u�
    .. versionadded:: 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 the :py:func:`cmd.run <salt.modules.cmdmod.run>` execution
        function.

    CLI Example:

    .. code-block:: bash

        salt '*' bower.prune /path/to/project

    upruneucmd.run_allRRRRuretcodeiustderrustdout(	RRRR
RRRRR(R!RRRR#((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pytprune�s
	(t__doc__t
__future__RRRtloggingRtsalt.utils.jsonRtsalt.utils.pathtsalt.exceptionsRtsalt.utils.versionsRR
t	getLoggert__name__tlogt__func_alias__RRRR	R%R&R'R((((s6/usr/lib/python2.7/site-packages/salt/modules/bower.pyt<module>
s&
				9-'

Zerion Mini Shell 1.0