check_lesson: Check the lesson structure for errors

Description Usage Arguments Value Examples

View source: R/check_lesson.R

Description

Check the lesson structure for errors

Usage

1
2
3
check_episode(path)

check_lesson(path = ".")

Arguments

path

the path to your lesson

Value

TRUE (invisibly) if the lesson is cromulent, otherwise, it will error with a list of things to fix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Everything should work out of the box
tmp <- tempfile()
create_lesson(tmp, open = FALSE)
check_lesson(tmp)

# if things do not work, then an error is thrown with information about 
# what has failed you
unlink(file.path(tmp, ".gitignore"))
unlink(file.path(tmp, "site"), recursive = TRUE)
try(check_lesson(tmp))

unlink(tmp)

zkamvar/sandpaper documentation built on Nov. 25, 2021, 1:16 p.m.