Esempio n. 1
0
def add_npm_bin_path(event, options, project=None, **kwargs):
    with in_directory(project.path()):
        npm_bin_path = project.path('node_modules/.bin')
        env_file_path = options.env_file
        env_file = open(env_file_path, 'a')
        env_file.write('\n# EXTEND PATH WITH NPM\n')
        env_file.write('export PATH="%s:$PATH"\n' % npm_bin_path)
        env_file.close()
def install_script_packages(event, options, project=None, **kwargs):
    # ensure we're in the project's root directory
    with in_directory(project.path()):
        install_script = project.path('./scripts/install.sh')
        if not os.path.exists(install_script):
            return

        # Installs the bundle requirements and the bins for each
        # requirement in the project's bin path
        call_subprocess(['bash', install_script, project.env_path()])
Esempio n. 3
0
def install_npm_packages(event, options, project=None, **kwargs):
    # ensure we're in the project's root directory
    with in_directory(project.path()):
        npm_path = which('npm')
        if not npm_path:
            logger.warning('Skipping node requirements. '
                    'npm must be installed on your system')
            return
        # Installs the bundle requirements and the bins for each
        # requirement in the project's bin path
        call_subprocess(['npm', 'install'])
def add_npm_bin_path(event, options, project=None, **kwargs):
    with in_directory(project.path()):
        env_script = project.path('./scripts/env.sh')
        if not os.path.exists(env_script):
            return

        env_file_path = options.env_file
        env_file = open(env_file_path, 'a')
        env_file.write('\n# EXTEND ENV WITH CUSTOM SCRIPT\n')
        env_file.write('. %s' % env_script)
        env_file.close()
Esempio n. 5
0
def install_ruby_bundler_requirements(event, options, project=None, **kwargs):
    # ensure we're in the project's root directory
    with in_directory(project.path()):
        # Check that bundler is installed on the system
        bundler_path = which('bundle')
        if not bundler_path:
            logger.warning('Skipping Ruby Requirements. '
                    'Bundler must be installed in your system')
            return
        # Installs the bundle requirements and the bins for each
        # requirement in the project's bin path
        call_subprocess([bundler_path, 'install',
            '--binstubs=%s' % project.bin_path()])