Skip to content

Commit

Permalink
Reads bower directory from .bowerrc
Browse files Browse the repository at this point in the history
Fixes #4
  • Loading branch information
searls committed Jan 14, 2014
1 parent 06a7928 commit 78cef0c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion config/plugins/bower.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
fs = require('fs')
path = require('path')

module.exports = (lineman) ->
config:
loadNpmTasks: lineman.config.application.loadNpmTasks.concat("grunt-bower-task")
Expand All @@ -7,9 +10,14 @@ module.exports = (lineman) ->

clean:
bower:
src: "vendor/bower"
src: bowerDirectory(lineman.grunt)

bower:
install:
options:
copy: false

bowerDirectory = (grunt) ->
bowerrc = path.join(process.cwd(), ".bowerrc")
bowerConfig = grunt.file.readJSON(bowerrc) unless !fs.existsSync(bowerrc)
bowerConfig?.directory || "vendor/bower"

0 comments on commit 78cef0c

Please sign in to comment.