module-package: Get package information under current 'RAVE' context

Description Usage Arguments See Also Examples

Description

Get package information under current 'RAVE' context

Usage

1
2
3
4
5

Arguments

path

relative path to file in the project

package

package name

See Also

rave-context

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(ravebase)

# Debug mode, but package is not specified
rave_context('rave_module_debug')
rave_module_package()

# Debug under ravebase package
rave_context('rave_module_debug', package = 'ravebase')
rave_module_package()

# Production mode, running modules under 'ravebase'
# always use with_rave_context to temporary set rave_running context
with_rave_context(context = 'rave_running', {
  rave_module_package()
}, package = 'ravebase')


# Get package directory
rave_context('rave_module_debug', package = 'ravebase')
rave_module_root_directory()

# Get path to a file within the package
# When debugging dipsaus, returns relative path of input_compound.js
# When running in production mode, returns system path
package_file('./inst/shiny-addons/dipsaus/dipsaus.css', package = 'dipsaus')

dipterix/rave2 documentation built on Sept. 1, 2020, 12:07 a.m.