Skip to content
Permalink
Browse files

fix(bower): get installed bower pkg version from pkg's .bower.json

Bower deprecated specifying version in pkg's bower.json. It now pulls the version from pkg's git tag. This fixes unnecessary bower pkg installs.
  • Loading branch information
jyounce committed Apr 9, 2016
1 parent 02cbdcb commit 487de5f5a032e81da8ead415fa81613c7db09012
Showing with 9 additions and 13 deletions.
  1. +9 −13 src/helpers/bower.coffee
@@ -166,11 +166,9 @@ module.exports = (config) ->

installed:
pkg: (pkg, loc='rb') ->
_path = path.join(
config.src[loc].client.bower.dir
pkg
config.bower[loc].file
)
dir = config.src[loc].client.bower.dir
file = ".#{config.bower[loc].file}"
_path = path.join dir, pkg, file
fileHelp.exists _path
get:
json:
@@ -181,13 +179,11 @@ module.exports = (config) ->
pkg: (pkg, loc='rb') ->
return unless me.has.installed.pkg pkg, loc
# console.log pkg, loc
require(
path.join(
config.src[loc].client.bower.dir
pkg
config.bower[loc].file
)
)
dir = config.src[loc].client.bower.dir
file = ".#{config.bower[loc].file}"
_path = path.join dir, pkg, file
bowerJson = require _path

pkgs:
from:
appOrRb: (loc='rb') ->
@@ -240,7 +236,7 @@ module.exports = (config) ->
for own pkg, version of jPkgs
missing = true
iPkgs.forEach (v) ->
missing = false if v.name is pkg
missing = false if v.name.toLowerCase() is pkg.toLowerCase()
pkgs.push "#{pkg}##{version}" if missing
pkgs

0 comments on commit 487de5f

Please sign in to comment.
You can’t perform that action at this time.