Guide_Wii/banner.js
lifehackerhansol 4e7fce4b19
treewide: import snapshot of minimal mistakes 4.24.0 and guide-specific changes
Guide_3DS@4de4c0b4ba894ce6a0fa7662d951d55cf42fbe56
2023-09-28 19:53:01 -07:00

19 lines
634 B
JavaScript

const fs = require("fs");
const pkg = require("./package.json");
const filename = "assets/js/main.min.js";
const script = fs.readFileSync(filename);
const padStart = str => ("0" + str).slice(-2);
const dateObj = new Date();
const date = `${dateObj.getFullYear()}-${padStart(
dateObj.getMonth() + 1
)}-${padStart(dateObj.getDate())}`;
const banner = `/*!
* Minimal Mistakes Jekyll Theme ${pkg.version} by ${pkg.author}
* Copyright 2013-${dateObj.getFullYear()} Michael Rose - mademistakes.com | @mmistakes
* Licensed under ${pkg.license}
*/
`;
if (script.slice(0, 3) != "/**") {
fs.writeFileSync(filename, banner + script);
}