{% set version = '1.0.3' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-visnetwork
  version: {{ version|replace("-", "_") }}

source:
  fn: visNetwork_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/visNetwork_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/visNetwork/visNetwork_{{ version }}.tar.gz
  sha256: 210e11a7364a69d158caf98fa39318a55ddcb6a3858d36f8ffdba86cb33e0373

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-htmltools
    - r-htmlwidgets
    - r-jsonlite
    - r-magrittr
  run:
    - r-base
    - r-htmltools
    - r-htmlwidgets
    - r-jsonlite
    - r-magrittr

test:
  commands:
    - $R -e "library('visNetwork')"  # [not win]
    - "\"%R%\" -e \"library('visNetwork')\""  # [win]

about:
  home: https://github.com/datastorm-open/visNetwork
  license: MIT
  summary: Provides an R interface to the 'vis.js' JavaScript charting library. It allows an
    interactive visualization of networks.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
