Skip to content

Commit ebbbce3

Browse files
working package with dependencies
0 parents  commit ebbbce3

File tree

18 files changed

+660
-0
lines changed

18 files changed

+660
-0
lines changed

.Rbuildignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$
3+
^\buil
4+
^README\.Rmd$
5+
^README-.*\.png$
6+
^\.travis\.yml$
7+
^CONDUCT\.md$

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
2+
3+
language: R
4+
sudo: false
5+
cache: packages

CONDUCT.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all people who
4+
contribute through reporting issues, posting feature requests, updating documentation,
5+
submitting pull requests or patches, and other activities.
6+
7+
We are committed to making participation in this project a harassment-free experience for
8+
everyone, regardless of level of experience, gender, gender identity and expression,
9+
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
10+
11+
Examples of unacceptable behavior by participants include the use of sexual language or
12+
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
13+
insults, or other unprofessional conduct.
14+
15+
Project maintainers have the right and responsibility to remove, edit, or reject comments,
16+
commits, code, wiki edits, issues, and other contributions that are not aligned to this
17+
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
18+
from the project team.
19+
20+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
21+
opening an issue or contacting one or more of the project maintainers.
22+
23+
This Code of Conduct is adapted from the Contributor Covenant
24+
(http:contributor-covenant.org), version 1.0.0, available at
25+
http://contributor-covenant.org/version/1/0/0/

DESCRIPTION

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Package: vueR
2+
Type: Package
3+
Title: 'Vuejs' Helpers
4+
Version: 0.1.0
5+
Date: 2016-11-28
6+
Authors@R: c(
7+
person(
8+
"Evan","You"
9+
, role = c("aut", "cph")
10+
, comment = "vue library in lib, https://vuejs.org/; see BACKERS for full list of Patreon backers"
11+
),
12+
person(
13+
"Kent", "Russell"
14+
, role = c("aut", "cre")
15+
, comment = "R interface"
16+
, email = "kent.russell@timelyportfolio.com"
17+
)
18+
)
19+
Maintainer: Kent Russell <kent.russell@timelyportfolio.com>
20+
Description: Make it easy to use 'vue' in R with helper
21+
dependency functions and examples.
22+
URL: https://github.com/timelyportfolio/vueR
23+
BugReports: https://github.com/timelyportfolio/vueR/issues
24+
License: MIT + file LICENSE
25+
LazyData: TRUE
26+
Imports:
27+
htmltools
28+
Suggests:
29+
htmlwidgets (>= 0.6.0),
30+
rmarkdown,
31+
shiny,
32+
knitr
33+
RoxygenNote: 5.0.1
34+
VignetteBuilder: knitr

NAMESPACE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Generated by roxygen2: do not edit by hand
2+
3+
export(html_dependency_vue)
4+
importFrom(htmltools,htmlDependency)

R/dependencies.R

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#' Dependencies for Vue
2+
#'
3+
#' @param offline \code{logical} to use local file dependencies. If \code{FALSE},
4+
#' then the dependencies use cdn as its \code{src}.
5+
#'
6+
#' @return \code{\link[htmltools]{htmlDependency}}
7+
#' @importFrom htmltools htmlDependency
8+
#' @export
9+
#'
10+
#' @examples
11+
#' library(vueR)
12+
#' library(htmltools)
13+
#'
14+
#' attachDependencies(
15+
#' tags$script(
16+
#' "
17+
#'
18+
#' "
19+
#' ),
20+
#' html_dependency_vue()
21+
#' )
22+
html_dependency_vue <- function(offline=TRUE){
23+
hd <- htmltools::htmlDependency(
24+
name = "vue",
25+
version = vue_version(),
26+
src = system.file("www/vue/dist",package="vueR"),
27+
script = c("vue.min.js")
28+
)
29+
30+
if(!offline) {
31+
hd$src <- list(href=sprintf(
32+
"//cdnjs.cloudflare.com/ajax/libs/vue/%s",
33+
vue_version()
34+
))
35+
}
36+
37+
hd
38+
}

R/meta.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#'@keywords internal
2+
vue_version <- function(){'2.1.3'}

README.Rmd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
output: github_document
3+
---
4+
5+
<!-- README.md is generated from README.Rmd. Please edit that file -->
6+
7+
```{r, echo = FALSE}
8+
knitr::opts_chunk$set(
9+
collapse = TRUE,
10+
comment = "#>",
11+
fig.path = "README-"
12+
)
13+
```
14+
15+
[![Travis-CI Build Status](https://travis-ci.org/timelyportfolio/vuer.svg?branch=master)](https://travis-ci.org/timelyportfolio/vueR)[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/vueR)](https://cran.r-project.org/package=vueR)
16+
17+
### Code of Conduct
18+
19+
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
[![Travis-CI Build Status](https://travis-ci.org/timelyportfolio/vuer.svg?branch=master)](https://travis-ci.org/timelyportfolio/vueR)[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/vueR)](https://cran.r-project.org/package=vueR)
4+
5+
### Code of Conduct
6+
7+
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

0 commit comments

Comments
 (0)