Last active
July 20, 2018 05:44
-
-
Save jimjam-slam/bddbc9b08cd5a6a88d669ac61a6415e1 to your computer and use it in GitHub Desktop.
Task runner to render bookdown projects in Visual Studio Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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