UNPKG

rigjs

Version:

A multi-repos dev tool based on yarn and git.Rigjs is intended to be the simplest way to develop,share and deliver codes between different developers or different projects.

20 lines (17 loc) 545 B
import fs from 'fs'; import { crewPaths } from './paths'; import { CrewEntry } from './config'; import { CrewTask, summarize } from './task'; export function writeCrewState(crew: CrewEntry, tasks: CrewTask[]): void { fs.mkdirSync(crewPaths.home, { recursive: true }); const summary = summarize(tasks); const data = { updatedAt: new Date().toISOString(), crew: crew.name, vault: crew.vault, root: crew.root, summary, tasks, }; fs.writeFileSync(crewPaths.state, JSON.stringify(data, null, 2) + '\n', 'utf8'); }