Skip to main content

ensure_starter

Function ensure_starter 

Source
pub fn ensure_starter(config_dir: &Path) -> Result<PathBuf>
Expand description

Ensure ~/.config/fresh/init.ts exists. If absent, writes the starter template. Also refreshes types/fresh.d.ts + tsconfig.json so the template’s /// <reference path=... directive resolves and getEditor() type-checks in any TS-aware editor. Returns the (possibly newly-created) init.ts path.