From 782a360d76b2a46698b5c7effddd7f2a53b18256 Mon Sep 17 00:00:00 2001 From: timelyportfolio Date: Mon, 8 Dec 2014 13:36:34 -0600 Subject: [PATCH] handle more bower cases with bower install in scaffoldWidget --- R/scaffold.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/scaffold.R b/R/scaffold.R index 3184d63f..5793d7cf 100644 --- a/R/scaffold.R +++ b/R/scaffold.R @@ -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){