Skip to content

Instantly share code, notes, and snippets.

export const SERVER_JSON_PATH = `${__dirname}/../../livescripts/json`
export const CLIENT_JSON_PATH = `${__dirname}/../../addon/json`
if (fs.existsSync(SERVER_JSON_PATH))
fs.rmSync(SERVER_JSON_PATH, { recursive: true, force: true })
if (fs.existsSync(CLIENT_JSON_PATH))
fs.rmSync(CLIENT_JSON_PATH, { recursive: true, force: true })
export function ServerJson (name: string, data: any, lines: string[] = [], isInit = true) {