-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cd6805d
Showing
5 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# lineman-bower | ||
|
||
This is a plugin to make it easy to use Bower in conjunction with a | ||
[Lineman](http://linemanjs.com) app. | ||
|
||
## Usage | ||
|
||
First, add the plugin to your lineman project: | ||
|
||
``` | ||
$ npm install lineman-bower --save-dev | ||
``` | ||
|
||
Second, you'll want to make sure that your bower dependencies don't get checked | ||
into git, so add them to your `.gitignore`: | ||
|
||
``` | ||
/vendor/bower | ||
``` | ||
|
||
Next, you'll need a `bower.json` to start pulling down dependencies: | ||
|
||
``` | ||
{ | ||
"name": "my-app", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"jquery": "~1.9.0" | ||
} | ||
} | ||
``` | ||
|
||
Finally, you'll want to make sure that jquery is made available when Lineman | ||
concatenates your vendor JavaScript libraries. You can do this by extending the | ||
`js.vendor` configuration in `config/files.js` like so: | ||
|
||
``` | ||
module.exports = require(process.env["LINEMAN_MAIN"]).config.extend("files", { | ||
js: { | ||
vendor: [ | ||
"vendor/bower/jquery/jquery.js", | ||
"vendor/js/**/*.js" //Note that this glob remains for traditional vendor libs | ||
] | ||
} | ||
}); | ||
``` | ||
|
||
Now, when you run `lineman run` and visit [localhost:8000](http://localhost:8000), | ||
you should see Bower install jQuery and have access to the library on the page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = (lineman) -> | ||
config: | ||
loadNpmTasks: lineman.config.application.loadNpmTasks.concat("grunt-bower-task") | ||
|
||
prependTasks: | ||
common: ["bower"].concat(lineman.config.application.prependTasks.common) | ||
|
||
clean: | ||
bower: | ||
src: "vendor/bower" | ||
|
||
bower: | ||
install: | ||
options: | ||
targetDir: "vendor/bower" | ||
cleanBowerDir: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
version: require('./package').version | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "lineman-bower", | ||
"title": "A Bower plugin for Lineman", | ||
"version": "0.0.1", | ||
"homepage": "https://github.com/testdouble/lineman-bower", | ||
"author": { | ||
"name": "Justin Searls", | ||
"company": "Test Double" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/testdouble/lineman-bower.git" | ||
}, | ||
"main": "main.js", | ||
"dependencies": { | ||
"grunt-bower-task": "~0.3.4", | ||
"coffee-script": "~1.6.3", | ||
"grunt": "~0.4.2" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1" | ||
}, | ||
"peerDependencies": { | ||
"lineman": ">= 0.19.0" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://mit-license.org" | ||
} | ||
] | ||
} |