Skip to content

Instantly share code, notes, and snippets.

@jimjam-slam
Last active July 20, 2018 05:44
Show Gist options
  • Save jimjam-slam/bddbc9b08cd5a6a88d669ac61a6415e1 to your computer and use it in GitHub Desktop.
Save jimjam-slam/bddbc9b08cd5a6a88d669ac61a6415e1 to your computer and use it in GitHub Desktop.
Task runner to render bookdown projects in Visual Studio Code
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Knit bookdown project",
"type": "shell",
"command": "/usr/local/bin/RScript -e 'setwd(\"index\"); bookdown::render_book(\"index.rmd\"); setwd(\"..\");'",
"windows": {
// note: if you put the R directory in your Windows PATH, Bash WSL can use it here!
"command": "Rscript.exe -e \"setwd(\\\"index\\\"); bookdown::render_book(\\\"index.rmd\\\"); setwd(\\\"..\\\");\""
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment