UNPKG

podchat-browser

Version:

Javascript SDK to use POD's Chat Service - Browser Only

21 lines (16 loc) 667 B
const packageJSON = require("./package.json"); // const srcVersion = require("./src/buildConfig.json"); const fs = require("fs") const isSnapshot = packageJSON.version.indexOf("snapshot") !== -1 const srcVersion = { version: packageJSON.version, date: new Date().toLocaleDateString("fa-IR"), VersionInfo: `Release: ${!isSnapshot}, Snapshot: ${isSnapshot}, Is For Test: ${isSnapshot}` }; fs.writeFile("./src/buildConfig.json", JSON.stringify(srcVersion), 'utf8', (err)=>{ if (err) { console.error("[Builder] Build info failed.") return console.error(err); } console.log("[Builder] Build info done.") });