From 46a8c85011533921f6509a6006409453d83323de Mon Sep 17 00:00:00 2001 From: JJ Allaire Date: Mon, 21 Oct 2013 16:09:16 -0400 Subject: [PATCH] always include a dependency on the shiny package --- R/dependencies.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/dependencies.R b/R/dependencies.R index 09f6d25..d7e86d1 100644 --- a/R/dependencies.R +++ b/R/dependencies.R @@ -54,8 +54,12 @@ appDependencies <- function(appDir = getwd()) { # detect all package dependencies for a directory of files dirDependencies <- function(dir) { - # first get the packages referred to in source code - pkgs <- character() + # start with the shiny package (the dependency on shiny can be implicit + # as the shiny package is automatically loaded prior to sourcing ui.R + # and server.R) + pkgs <- c("shiny") + + # now get the packages referred to in the source code sapply(list.files(dir, pattern=glob2rx("*.R"), ignore.case=TRUE, recursive=TRUE), function(file) {