compile_tailwindcss | R Documentation |
See also tailwind docs
compile_tailwindcss( infile, outfile, watch = FALSE, minify = FALSE, content = ".", tailwindcss = NULL, verbose = FALSE )
infile |
the 'TailwindCSS' file (eg containing the |
outfile |
the target css file, where tailwind will write the css to. Relative to basedir |
watch |
if the files should be continuously monitored (versus only compile the css once), default is False |
minify |
if the code should be minified, default is FALSE |
content |
content paths to remove unused classes, default is current dir |
tailwindcss |
name and path to the executable |
verbose |
print information |
the outfile invisibly
install_tailwindcss_cli
if (interactive()) { temp <- tempdir() owd <- setwd(temp) infile <- "custom.css" writeLines("@tailwind base;", infile) outfile <- "out.css" # file.copy(system.file("examples", "01-Old_Faithful", "app.R", package = "shiny.tailwind"), # "app.R", overwrite = TRUE) # write a mini shiny UI writeLines(" library(shiny) div(class = \"page-div\", div(class = \"w-full text-center py-12\", h1(\"Hello World\") ) )", "app.R") tailwindcss <- NULL # can be set to the executable file compile_tailwindcss(infile, outfile, tailwindcss = tailwindcss) cat(paste(readLines(outfile)[1:20], collapse = "\n")) setwd(owd) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.