{% set version = '0.2.6' %}

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

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

source:
  fn: shinyTree_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/shinyTree_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/shinyTree/shinyTree_{{ version }}.tar.gz
  sha256: d278405c3e7ef31064367b9b165bbde900ecb472e0ed7c5d91ee572d37b786e7

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: testthat
requirements:
  build:
    - {{posix}}zip               # [win]

  host:
    - r-base
    - r-jsonlite
    - r-shiny >=0.9.0

  run:
    - r-base
    - r-jsonlite
    - r-shiny >=0.9.0

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

about:
  home: https://CRAN.R-project.org/package=shinyTree
  license: MIT
  summary: Exposes bindings to jsTree -- a JavaScript library that supports interactive trees
    -- to enable a rich, editable trees in Shiny.
  license_family: MIT

extra:
  recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
