0.3.13 • Published 7 years ago

pisco-plugin-bower v0.3.13

Weekly downloads
32
License
-
Repository
-
Last release
7 years ago

Main Index:

Available Commands:

FLOWS

STEPS

PLUGINS

bower (Execute a bower install)

[Index]

Bower commands wrapper for pisco

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 pisco-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}

ParamDescription
optsarray with command options to append to bower list for example '--offline', '--json'
returnsa 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.