Skip to content

Commit

Permalink
handle more bower cases with bower install in scaffoldWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Dec 8, 2014
1 parent f9b41dd commit 782a360
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/scaffold.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ readBower <- function(pkg, src = "inst/htmlwidgets/lib"){

# Get YAML configuration for widget
getConfig <- function(pkg, src = "inst/htmlwidgets/lib"){
# handle bower when in github shorthand or with full git path
# by using basename and removing .git from basename
# see http://bower.io/#install-bower
# "A package can be a GitHub shorthand, a Git endpoint, a URL, and more."
pkg = gsub(basename(pkg),pattern="([.]*)(.git)",replacement="")
deps = readBower(pkg, src)$deps
all = c(names(deps),pkg)
config = lapply(all, function(pkg){
Expand Down

0 comments on commit 782a360

Please sign in to comment.