runas-plugin-bower
v0.3.14
Published
Runas plugin for bower
Downloads
6
Readme
Main Index:
Available Commands:
FLOWS
STEPS
PLUGINS
bower (Execute a bower install)
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
andbower 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)
Description
Plugin used to register bower repositories using a public bower registry
How to use this plugin:
- Implicit: Calling public addons.
- 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.