blockbench/scripts/enable_beta.js
2024-09-29 15:02:26 +02:00

15 lines
533 B
JavaScript

const fs = require('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');