Module Expr Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Import alias identifier ImportFrom alias alias alias alias ImportFrom alias alias ImportFrom alias Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias identifier Assign NameStore Call NameLoad If CompareEq NameLoad Str body Assign NameStore ListLoad Str Str Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore ListLoad Str Str Str Str Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad Assign NameStore BinOpMod Str NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num Num Expr Call NameLoad keyword BinOpMod Str Dict Str Str NameLoad NameLoad Expr Call NameLoad BinOpMod Str NameLoad With Call NameLoad NameLoad body Expr Call NameLoad Str Expr Call NameLoad BinOpMod Str BinOpAdd Call NameLoad Num If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad orelse Expr Call NameLoad Str Expr Call NameLoad BinOpMod Str Call NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body Expr Str With Call NameLoad Call NameLoad Str Str Str keyword NameLoad body Assign NameStore Call NameLoad BinOpMod Str Call NameLoad If AttributeLoad NameLoad attr body Return NameLoad orelse Return SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str body Expr Str If NameLoad body AugAssignAdd NameStore BinOpMod Str NameLoad If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad orelse Expr Call NameLoad BinOpMod Str Call NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body Expr Str Expr Call NameLoad BinOpMod Str Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str Assign NameStore ListLoad Str Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad With Call NameLoad Str Str body Assign NameStore Call NameLoad BinOpMod Str Call NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Str Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return SubscriptLoad NameLoad Index Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad orelse Expr Call NameLoad BinOpMod Str Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str body Expr Str If NameLoad body AugAssignAdd NameStore BinOpMod Str NameLoad If NameLoad body Expr Call NameLoad BinOpMod Str Call NameLoad orelse Expr Call NameLoad BinOpMod Str Call NameLoad decorator_list
N/A N/A 
Node.js
=======

This module provides tools for installing `Node.js`_ and managing
packages using `npm`_.

.. note: the ``simplejson`` module is required on Python 2.5

.. _Node.js: http://nodejs.org/
.. _npm: http://npmjs.org/

 N/A N/A N/A json N/A N/A N/A ImportError N/A N/A simplejson json fabric.api cd hide run settings fabtools.system cpus distrib_family fabtools.utils run_as_root N/A DEFAULT_VERSION 0.10.13 install_from_source N/A N/A version checkinstall N/A DEFAULT_VERSION False N/A N/A 
    Install Node JS from source.

    If *checkinstall* is ``True``, a distribution package will be built.

    ::

        import fabtools

        # Install Node.js
        fabtools.nodejs.install_nodejs()

    .. note:: This function may not work for old versions of Node.js.

     fabtools.require.deb packages require_deb_packages fabtools.require.rpm packages require_rpm_packages fabtools.require file require_file N/A family N/A distrib_family N/A N/A family debian N/A N/A packages N/A build-essential libssl-dev python N/A checkinstall N/A N/A N/A N/A packages append checkinstall N/A N/A require_deb_packages packages N/A N/A N/A family redhat N/A N/A packages N/A gcc gcc-c++ make openssl-devel python N/A checkinstall N/A N/A N/A N/A packages append checkinstall N/A N/A require_rpm_packages packages N/A filename N/A node-v%s.tar.gz version N/A foldername N/A filename N/A 0 -7 N/A N/A require_file url N/A http://nodejs.org/dist/v%(version)s/%(filename)s N/A version filename version filename N/A N/A run N/A tar -xzf %s filename N/A N/A cd foldername N/A N/A N/A run ./configure N/A N/A run N/A make -j%d N/A N/A cpus 1 N/A checkinstall N/A N/A N/A run_as_root N/A checkinstall -y --pkgname=nodejs --pkgversion=%(version) --showinstall=no make install N/A locals N/A N/A N/A run_as_root make install N/A N/A run N/A rm -rf %(filename)s %(foldername)s N/A locals N/A version N/A N/A node N/A node N/A N/A 
    Get the version of Node.js currently installed.

    Returns ``None`` if it is not installed.
     N/A N/A settings N/A hide running stdout warnings warn_only True N/A N/A res N/A run N/A %(node)s --version N/A locals N/A N/A res failed N/A N/A None N/A N/A N/A res N/A 1 N/A install_package N/A N/A package version local npm N/A None False npm N/A N/A 
    Install a Node.js package.

    If *local* is ``True``, the package will be installed locally.

    ::

        import fabtools

        # Install package globally
        fabtools.nodejs.install_package('express')

        # Install package locally
        fabtools.nodejs.install_package('underscore', local=False)

     N/A version N/A N/A package N/A @%s version N/A local N/A N/A N/A run N/A %(npm)s install -l %(package)s N/A locals N/A N/A N/A run_as_root N/A HOME=/root %(npm)s install -g %(package)s N/A locals N/A install_dependencies N/A N/A npm N/A npm N/A N/A 
    Install Node.js package dependencies.

    This function calls ``npm install``, which will locally install all
    packages specified as dependencies in the ``package.json`` file
    found in the current directory.

    ::

        from fabric.api import cd
        from fabtools import nodejs

        with cd('/path/to/nodejsapp/'):
            nodejs.install_dependencies()

     N/A N/A run N/A %(npm)s install N/A locals N/A package_version N/A N/A package local npm N/A False npm N/A N/A 
    Get the installed version of a Node.js package.

    Returns ``None``is the package is not installed. If *local* is
    ``True``, returns the version of the locally installed package.
     N/A options N/A --json true --silent N/A local N/A N/A N/A N/A options append -l N/A N/A N/A N/A options append -g N/A options N/A N/A join options N/A N/A hide running stdout N/A N/A res N/A run N/A %(npm)s list %(options)s N/A locals N/A dependencies N/A N/A N/A N/A json loads res get dependencies N/A N/A pkg_data N/A N/A dependencies get package N/A pkg_data N/A N/A N/A pkg_data N/A version N/A N/A None N/A update_package N/A N/A package local npm N/A False npm N/A N/A 
    Update a Node.js package.

    If *local* is ``True``, the package will be updated locally.
     N/A local N/A N/A N/A run N/A %(npm)s update -l %(package)s N/A locals N/A N/A N/A run_as_root N/A HOME=/root %(npm)s update -g %(package)s N/A locals N/A uninstall_package N/A N/A package version local npm N/A None False npm N/A N/A 
    Uninstall a Node.js package.

    If *local* is ``True``, the package will be uninstalled locally.

    ::

        import fabtools

        # Uninstall package globally
        fabtools.nodejs.uninstall_package('express')

        # Uninstall package locally
        fabtools.nodejs.uninstall_package('underscore', local=False)

     N/A version N/A N/A package N/A @%s version N/A local N/A N/A N/A run N/A %(npm)s uninstall -l %(package)s N/A locals N/A N/A N/A run_as_root N/A HOME=/root %(npm)s uninstall -g %(package)s N/A locals N/A