{% set version = '0.2.0' %}

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

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

source:
  fn: prettydoc_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/prettydoc_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/prettydoc/prettydoc_{{ version }}.tar.gz
  sha256: b7995163b2d287fb8cc78a7adc011882253d5237448e6aa090f02be92989fbfe

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

requirements:
  build:
    - r-base
    - r-rmarkdown >=1.0
  run:
    - r-base
    - r-rmarkdown >=1.0

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

about:
  home: https://github.com/yixuan/prettydoc
  license: Apache-2-0
  summary: Creating tiny yet beautiful documents and vignettes from R Markdown. The package provides
    the 'html_pretty' output format as an alternative to the 'html_document' and 'html_vignette'
    engines that convert R Markdown into HTML pages. Various themes and syntax highlight
    styles are supported.
  license_family: APACHE

extra:
  recipe-maintainers:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
