In this example, learn how to integrate SASS into your Shiny development workflow. To get this example working, you will need to install node.js and SASS on your machine. See the Install SASS guide for additional instructions. There are two build scripts: one for development and one for production. When you have node installed, you can run these scripts in the command line.
npm run start # for development
npm run build # for production
Future applications will demonstrate how to integrate application bundlers and additional plugins, but we will keep things simple for now. For more information, checkout out the accompanying blog post Shiny and CSS preprocessors: Getting started with SASS in Shiny.
You can run this app locally using the following methods: running within your R environment or cloning this subdirectory.
You can run this app within your R environment using the runGithub
function. Enter the following command in the console.
shiny::runGitHub(username = "davidruvolo51", repo = "shinyAppTutorials", subdir = "sass-in-shiny")
You can clone the data editor subdirectory using git sparse-checkout
.
git clone --filter=blob:none --sparse https://github.com/davidruvolo51/shinyAppTutorials
cd shinyAppTutorials
git sparse-checkout init --cone
git sparse-checkout set sass-in-shiny
Then you can run the shiny app in your preferred R environment.