UNPKG

node-red-contrib-jewishtimer

Version:

A Timer for node-red which supports jewish dates and Zmanim

18 lines (13 loc) 647 B
// A poor mans build, just doing what gotta be done. const fs = require("fs"); const { DAYS_COUNT, TIMER_COUNT, TIMER_HTML, DAYS_HTML} = require("./settings"); console.log("Build: Reading html file..."); let html = fs.readFileSync("./timer.dev.html","utf-8"); console.log("Build: Populating content..."); html = html.replace("/* REPLACE_TIMER_COUNT */",TIMER_COUNT) .replace("/* REPLACE_DAYS_COUNT */",DAYS_COUNT) .replace("<!-- REPLACE_TIMER_HTML -->",TIMER_HTML) .replace("<!-- REPLACE_DAYS_HTML -->",DAYS_HTML); console.log("Build: Writing file..."); fs.writeFileSync("./timer.html", html); console.log("Build: Done");