-
Notifications
You must be signed in to change notification settings - Fork 3
Bower build
The Grunt plugin grunt-bower-concat
is used to automate concatenation of bower dependencies. There are separate bower_concat
tasks for dev
and live-build
. Both tasks will accept minified and unminified bower dependencies, but differ in priority:
-
bower_concat:dev
will search for non-minified version first. If non are found it will include the minified versions. -
bower_concat:build
(production/live builds) will search for minified versions first. If non are found, it will include the non-minified versions.
The grunt-bower-concat
module has various options available, which allow you to include/exclude bower packages, manually specify the "main" files if dependencies don't specify them (or don't have a bower.json file), or manually specify dependencies for a bower package.
Refer to the grunt-bower-concat documentation for available options.
All peer dependencies are required to have at their built development and/or production (.min.) files listed in the main
array of their bower.json
config file.
Ex:
Files in the "example" project are built to:
dist/exmaple.js
dist/example.js-templates.js
dist/example.min.js
dist/exmaple.css
dist/exmaple.min.css
The main
property of the "example" repo's bower.json
file could look something like this:
...
"main": [
"./dist/example-templates.js"
"./dist/example.js"
"./dist/example.css"
],
...