grunt-bower-install-simple v1.2.8
grunt-bower-install-simple
Grunt Task for Installing Bower Dependencies
ATTENTION: Bower is deprecated and obsolete! Use this Grunt task only for legacy purposes, please!
Getting Started
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-bower-install-simple --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks("grunt-bower-install-simple");
Task Options
color
(defaulttrue
): Whether output is colorized. The equivalent ofbower --config.color=<value>
.cwd
(defaultprocess.cwd()
): The directory from which Bower should run. All relative paths in Bower will be calculated according to this. The equivalent ofbower --config.cwd=`pwd`
.forceLatest
(defaultfalse
): Force latest dependency version on conflict. The equivalent ofbower install --force-latest
.production
(defaultfalse
): Do not install projectdevDependencies
. The equivalent ofbower install --production
.interactive
(defaulttrue
): Makes Bower interactive, prompting whenever necessary. The equivalent ofbower --config.interactive=true
.directory
(defaultundefined
): The path in which installed components should be saved. This defaults tobower_components
. The equivalent ofbower --config.directory=<dir>
.command
(defaultinstall
): Provide the bower command it should run. Setting this toupdate
will runbower update
instead ofbower install
.
Task Calling
Run this task with the grunt bower-install-simple
command.
Task targets, files and options may be specified according to the Grunt Configuring tasks guide.
Usage Example
Assuming we have the following build environment:
Gruntfile.js
:
// [...]
grunt.initConfig({
"bower-install-simple": {
options: {
color: true,
directory: "lib"
},
"prod": {
options: {
production: true
}
},
"dev": {
options: {
production: false
}
}
}
});
grunt.registerTask("bower-install", [ "bower-install-simple" ]);
// [...]
bower.json
:
{
"name": "sample",
"version": "0.0.0",
"devDependencies": {
"componentjs": "~1.2.7",
"jquery": "~2.1.4",
"lodash": "~3.10.1"
}
}
Then running grunt bower-install
is functionality-wise equivalent
to running bower --config.color=false --config.directory=lib install
--production
. It will read the bower.json
and install ComponentJS,
jQuery and Lo-Dash into the local lib
directory.
6 years ago
6 years ago
7 years ago
7 years ago
8 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
12 years ago
12 years ago