runas-plugin-bower
Runas plugin for bower
Last updated 3 years ago by sbonacho .
Original npm · Tarball · package.json
$ cnpm install runas-plugin-bower 
SYNC missed versions from official npm registry.

Main Index:

Available Commands:

FLOWS

STEPS

PLUGINS

bower (Execute a bower install)

[Index]

Bower commands wrapper for runas

Hook (stages: check, config, run)

Any step can ensure that bower install or bower update are correctly executed:

1. Install plugin in your recipe

Add package dependency:

npm install runas-plugin-bower --save

Add plugin on steps/$stepName/config.json plugins:

{
  "plugins": [
    [...]
    "bower" 
  ]
}

2. Add bower requirement to Step

{
  "requirements": {
    [...]
    "bower": {}
  }
}

3. Configure plugin in config.json of your step

{
  "bower": {
    "installed": true,
    "updated": true,
    "forceLatest": false, (default is true)
    "baseDir" : "any", (default is '.') 
    "directory" : "bower_components" (default is 'bower_components')
  }
}
  • installed (default: false) Ensure that bower install is executed if ${bower.directory} doesn't exists execute bower install.
  • updated (default: false) Ensure that bower update and bower prune are executed. Detect if there are symbolics links and ask user to delete
  • forceLatest (default: true) append --force-latest (-F) to bower install or bower update command.
  • directory (default: 'bower_components') must to be the same value of directory in .bowerrc file.
  • baseDir (default: '.') path to bower.json file relative.

4. Configure the stages for the hook (could be check, config or run)

By default the hook is set on check stage

In config.json of your step

{
  "stages" : ["check", "config", "run"],
  "bower": {
    [...]
  }
}

Examples:

Normal use, ensure bower install was executed:

{
  "bower": {
    "installed": true
  }
}

Check if there are symbolics links and ask user to update:

{
  "bower": {
    "updated": true
  }
}

this.bowerList

Execute bower list ${opts}

Param Description
opts array with command options to append to bower list for example [ '--offline', '--json' ]
returns a Promise with the complete child_process object result of the execution

bowerRegistry (Check bower registry configuration)

[Index]

Description

Plugin used to register bower repositories using a public bower registry

How to use this plugin:

    1. Implicit: Calling public addons.
    1. Explicit: By configuration. Checks if bower Registry is well configured.

configure this.params.stages with an array of the stages you want to check if the npm registry is ok.

  "stages" : ["check", "run"]

Check and configure ~/.bowerrc file that is right configured using artifactory.

Addons

this.registerBower

Return: 0 if everything is Ok or status of the command executed.

Current Tags

  • 0.3.14                                ...           latest (3 years ago)

1 Versions

  • 0.3.14                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |