Browse Source

Declare htmlwidgets dependencies

master
Garrick Aden-Buie 6 years ago
parent
commit
969fd962ed
2 changed files with 24 additions and 7 deletions
  1. +18
    -0
      dev/dev.Rmd
  2. +6
    -7
      inst/htmlwidgets/frappeChart.yaml

+ 18
- 0
dev/dev.Rmd View File

usage, this is also where we'll put code that would let us update the usage, this is also where we'll put code that would let us update the
widget in place without having to re-render the whole chart. widget in place without having to re-render the whole chart.
To create the htmlwidget,
we're going to work through each of these pieces
and put them in the right places.

# Make it an htmlwidget

## Declare dependencies

**FILE:** `inst/htmlwidgets/frappeChart.yaml`

Take the `htmltools::htmlDependency()` and
turn it into `inst/htmlwidgets/frappeChart.yaml`.

```{r}
rstudioapi::navigateToFile("inst/htmlwidgets/frappeChart.yaml")
```

Note: keep `htmlwidgets` in `src`!

+ 6
- 7
inst/htmlwidgets/frappeChart.yaml View File

# (uncomment to add a dependency)
# dependencies:
# - name:
# version:
# src:
# script:
# stylesheet:
dependencies:
- name: "frappe-charts"
version: "1.3.0"
src: "htmlwidgets/lib/frappe-charts"
script: "frappe-charts.min.iife.js"
all_files: TRUE

Loading…
Cancel
Save