compile_lesson: compile_lesson

View source: R/compile_lesson.R

compile_lessonR Documentation

compile_lesson

Description

Compiles selected sections of a lesson (or "all"). Results in a LESSON.JSON, but files are not staged for publishing. Need to follow with a call to stage_assets() and publish() to publish these changes to the web. Tries to use cacheing, but sometimes, may need to run a function twice to get efficient time savings because of delay in modTimes with Google Drive for Desktop.

Usage

compile_lesson(WD = "?", choices, current_data, clean = FALSE, rebuild = NULL)

lesson_compile(WD = "?", choices, current_data, clean = FALSE, rebuild = NULL)

Arguments

WD

is working directory of the project (useful to supply for shiny app, which has diff. working environment); if "?" supplied, will invoke pick_lesson()

choices

one or more of the following: c("Front Matter","Standards Alignment","Teaching Materials","Procedure","Acknowledgements","Versions"); or "All". If missing, will compile things in the ReadyToCompile entry in front-matter.yml for the WD folder.

current_data

the reconciled data including yaml and input from the shiny app environment; if current_data=NULL, read in front-matter.yml

clean

delete all JSON files in meta/ and start over? default=FALSE

rebuild

if T, rebuild everything; overrides RebuildAllMaterials in front-matter.yml; default= NULL

Details

Combines functionality of:

  • compile_fm()

  • compile_standards()

  • learningEpaulette()

  • compileAcknowledgments()

  • compileVersions()

  • compileJSON()

Intended for a single lesson in the current RStudio project. Use batch_rebuild() to compile and rebuild more than one lesson (or a single lesson outside the current project).

Value

current_data; also the lesson JSON is saved to meta/JSON/LESSON.json

Functions

  • lesson_compile():


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.