-
Notifications
You must be signed in to change notification settings - Fork 301
Tweak roxygen2 workflow #1055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak roxygen2 workflow #1055
Changes from all commits
6b2d6c1
e2e0166
09f8bf7
0c80b63
e39319b
38d6d3c
d96a454
64a59bb
15eb0c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,21 @@ | ||
| #' Use a basic `NAMESPACE` | ||
| #' | ||
| #' This `NAMESPACE` exports everything, except functions that start | ||
| #' with a `.`. | ||
| #' If `roxygen` is `TRUE` generates an empty `NAMESPACE` that exports nothing; | ||
| #' you'll need to explicitly export functions with `@export`. If `roxygen` | ||
| #' is `FALSE`, generates a default `NAMESPACE` that exports all functions | ||
| #' except those that start with `.`. | ||
| #' | ||
| #' @param roxygen Do you plan to manage `NAMESPACE` with roxygen2? | ||
| #' @seealso The [namespace chapter](https://r-pkgs.org/namespace.html) of | ||
| #' [R Packages](https://r-pkgs.org). | ||
| #' | ||
| #' @export | ||
| use_namespace <- function() { | ||
| use_namespace <- function(roxygen = TRUE) { | ||
| check_is_package("use_namespace()") | ||
| use_template("NAMESPACE") | ||
|
|
||
| path <- proj_path("NAMESPACE") | ||
| if (roxygen) { | ||
| write_over(path, c("# Generated by roxygen2: do not edit by hand", "")) | ||
| } else { | ||
| write_over(path, 'exportPattern("^[^\\.]")') | ||
| } | ||
| } | ||
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.