---
title: "Create package description page"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{ad-create-description-file}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

<script type="text/javascript">
$(document).ready(function () {
  window.initializeCodeFolding("show" === "show");
});
</script>

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(papillon)
```

## To describe your package and how to install it

This can be useful to create your Readme for instance or to send the instructions file for your clients to install your package.

```{r}
path <- system.file("DESCRIPTION", package = "papillon")
out.dir <- tempdir()
create_pkg_desc_file(path, source = c("archive"), to = "html")
```

```{r, results="asis"}
shiny::includeHTML(file.path(out.dir, "pkg_description.html"))
```

## Create and update a custom README with installation instructions

- This uses {usethis} Readme template for packages and fill the installation instructions.  
- This function can be run anytime during project development as it will only update the description and installation parts

```{r, eval=FALSE}
papillon::generate_readme_rmd()
```

