|
| 1 | +--- |
| 2 | +title: "How-to: Rhino 1.6 Migration Guide" |
| 3 | +output: rmarkdown::html_vignette |
| 4 | +vignette: > |
| 5 | + %\VignetteIndexEntry{How-to: Rhino 1.6 Migration Guide} |
| 6 | + %\VignetteEngine{knitr::rmarkdown} |
| 7 | + %\VignetteEncoding{UTF-8} |
| 8 | +--- |
| 9 | + |
| 10 | +Transition your project to Rhino version 1.6 with this comprehensive guide. The latest version includes Node module updates to enhance your development workflow. |
| 11 | + |
| 12 | +# Prerequisites |
| 13 | + |
| 14 | +- Back up your project data. |
| 15 | +- Ensure Node.js is up-to-date on your machine. |
| 16 | + |
| 17 | +# Installation of Rhino 1.6 |
| 18 | + |
| 19 | +Choose one of the following methods to install Rhino 1.6: |
| 20 | + |
| 21 | +## Option 1: Using `renv` |
| 22 | + |
| 23 | +Install Rhino using renv and then take a snapshot of your project dependencies: |
| 24 | + |
| 25 | +```r |
| 26 | +renv::install("rhino") |
| 27 | +renv::snapshot() |
| 28 | +``` |
| 29 | + |
| 30 | +## Option 2: Using `rhino::pkg_install` (for Rhino v1.4+) |
| 31 | + |
| 32 | +For newer versions of Rhino, you can use the built-in package installation function: |
| 33 | + |
| 34 | +```r |
| 35 | +rhino::pkg_install("rhino") |
| 36 | +``` |
| 37 | + |
| 38 | +After the installation, restart your R session to ensure all changes take effect. |
| 39 | + |
| 40 | +# Migration Steps |
| 41 | + |
| 42 | +## Step 1: Remove the `.rhino` Directory |
| 43 | + |
| 44 | +Locate and remove the `.rhino` directory from the root of your project. This directory contains configuration settings from the previous version of Rhino. |
| 45 | + |
| 46 | +```bash |
| 47 | +rm -rf .rhino |
| 48 | +``` |
| 49 | + |
| 50 | +## Step 2: Run Node Tool Functions |
| 51 | + |
| 52 | +Invoke one of the following commands to run Node tools. This action will regenerate the `.rhino` directory with a new configuration, including updated Node modules. |
| 53 | + |
| 54 | +```r |
| 55 | +rhino::build_sass() |
| 56 | +rhino::lint_sass() |
| 57 | +rhino::build_js() |
| 58 | +rhino::lint_js() |
| 59 | +``` |
| 60 | + |
| 61 | +## Step 3: Migrate Cypress End-to-End Tests |
| 62 | + |
| 63 | +If your project includes Cypress end-to-end tests, initiate the migration wizard with: |
| 64 | + |
| 65 | +```r |
| 66 | +rhino::test_e2e(interactive = TRUE) |
| 67 | +``` |
| 68 | + |
| 69 | +Follow the prompts in the migration wizard to update your end-to-end tests. |
| 70 | + |
| 71 | +## Step 4: Test Your Project |
| 72 | + |
| 73 | +Conduct extensive testing to confirm that all components of your project function properly after the migration. |
| 74 | + |
| 75 | +# Final Steps |
| 76 | + |
| 77 | +If you encounter any issues or have further questions after migrating to Rhino 1.6, please consult the GitHub discussions for Rhino for community and developer support. |
0 commit comments