Skip to content

Commit 2cfd8b5

Browse files
authored
Fix test on rdevel (#651)
* install pkg at beginning from cran, not github * check on all 3 major flavors of R * check that javascript has been built * Update .travis.yml * use yarn instead of npm update pkgs and docs * compile js * check roxygen is up to date * Update .travis.yml * fix bad name to ignore * remove linting and add it only on release version * Remove roxygen check for now * use alpha values in colors * convert testit tests to testthat tests * Fix broken color test If no alpha values are found, always append them * add comment
1 parent 18ec981 commit 2cfd8b5

23 files changed

+5437
-6212
lines changed

.Rbuildignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
^package\.json$
1414
^node_modules$
1515
^data-raw$
16-
^npm-shrinkwrap\.json$
16+
^yarn\.lock$
1717
^\.Rprofile\.local$
1818
^inst/htmlwidgets/lib/.*/.*\.map$
1919
^inst/htmlwidgets/plugins/.*/.*\.map$

.lintr

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
linters: with_defaults(
2-
camel_case_linter = NULL,
3-
line_length_linter = NULL, # line_length_linter(100),
2+
object_name_linter = NULL,
3+
line_length_linter = NULL,
44
commented_code_linter = NULL,
5-
object_usage_linter = NULL,
6-
NULL
5+
object_usage_linter = NULL
6+
)
7+
exclusions: list(
8+
"inst/examples/icons.R",
9+
"inst/examples/leaflet.R",
10+
"inst/examples/legend.R"
711
)
8-
exclusions: list()

.travis.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,33 @@ notifications:
1313
on_success: change
1414
on_failure: change
1515

16-
r_github_packages:
17-
- jimhester/lintr
18-
after_success:
19-
- Rscript -e 'lintr::lint_package()'
16+
jobs:
17+
include:
18+
- name: "R: oldrel"
19+
r: oldrel
20+
21+
- name: "R: release"
22+
r: release
23+
# TODO fix all lints
24+
# r_packages:
25+
# - lintr
26+
# after_success:
27+
# - Rscript -e 'lintr::lint_package()'
28+
29+
- name: "R: devel"
30+
r: devel
31+
32+
33+
# - name: "Roxygen check"
34+
# r: release
35+
# r_packages:
36+
# - devtools
37+
# - roxygen2
38+
# script: ./scripts/checkDocsCurrent.sh
39+
40+
- name: "Javascript check"
41+
language: node_js
42+
cache: yarn
43+
script: ./scripts/checkJSCurrent.sh
44+
node_js:
45+
- "12"

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Suggests:
5757
maps,
5858
sf,
5959
shiny,
60-
testit (>= 0.4),
6160
rgdal,
6261
rgeos,
6362
R6,

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,34 @@ http://rstudio.github.io/leaflet You may use [Github issues](https://github.com/
3636

3737
## Development
3838

39-
To make additions or modifications to the JavaScript htmlwidgets binding layer,
40-
you must use Grunt to build and test. Please make sure Node.js is installed on
41-
your system, then run:
39+
`leaflet`'s JavaScript build tools use Node.js, along with [yarn](https://yarnpkg.com/) to manage the JavaScript packages.
4240

43-
```
44-
npm install -g grunt-cli
45-
npm install
41+
Install `yarn` using the [official instructions](https://yarnpkg.com/en/docs/install).
42+
43+
You can test that Node.js and yarn are installed properly by running the following commands:
44+
45+
```bash
46+
node --version
47+
yarn --version
4648
```
4749

48-
Now you can build/minify/lint/test using `grunt build`, or run in "watch" mode
49-
by just running `grunt`. JS sources go into `javascript/src` and tests go into
50+
To make additions or modifications to the JavaScript `htmlwidgets` binding layer,
51+
you must have all Node.js dependencies installed. Now you can build/minify/lint/test using `yarn build`, or run in "watch" mode
52+
by just running `yarn watch`. JS sources go into `javascript/src` and tests go into
5053
`javascript/tests`.
5154

55+
```bash
56+
# install dependencies
57+
yarn
58+
59+
# compile
60+
yarn build
61+
62+
# watch
63+
yarn watch
64+
```
65+
66+
5267
## License
5368

5469
This package is licensed to you under the terms of the [GNU General Public

0 commit comments

Comments
 (0)