blockbench/scripts/enable_beta.js
2025-03-02 23:41:45 +01:00

15 lines
528 B
JavaScript

import fs from 'fs';
const index_path = './index.html';
const cname_path = './CNAME';
let package_file = fs.readFileSync(index_path, {encoding: 'utf-8'});
package_file = package_file.replace('manifest.webmanifest', 'manifest-beta.webmanifest');
package_file = package_file.replace('favicon.png', 'icons/favicon_beta.png');
fs.writeFileSync(index_path, package_file, {encoding: 'utf-8'});
fs.writeFileSync(cname_path, 'beta.blockbench.net', {encoding: 'utf-8'});
console.log('Changed index.html and manifest file to beta');