Description Usage Arguments See Also Examples
Get package information under current 'RAVE' context
1 2 3 4 5 | rave_module_package()
rave_module_root_directory()
package_file(path, package = NULL)
|
path |
relative path to file in the project |
package |
package name |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Debug mode, but package is not specified
rave_context('rave_module_debug')
rave_module_package()
# Debug under ravecore package
rave_context('rave_module_debug', package = 'ravecore')
rave_module_package()
# Production mode, running modules under 'ravecore'
# always use with_rave_context to temporary set rave_running context
with_rave_context(context = 'rave_running', {
rave_module_package()
}, package = 'ravecore')
# Get package directory
rave_context('rave_module_debug', package = 'raveutils')
rave_module_root_directory()
# Get path to a file within the package
# When debugging ravecore, returns relative path of input_compound.js
# When running in production mode, returns system path
package_file('./inst/assets/input_compound.js', package = 'ravecore')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.