Make base module and index.html file configurable with BASE_MODULE. Adding bare Liquid module.

This commit is contained in:
softsimon
2021-07-27 17:10:38 +03:00
parent 21e527b26c
commit ca306f5727
17 changed files with 420 additions and 20 deletions

View File

@@ -21,6 +21,16 @@ try {
}
}
const indexFilePath = configContent.BASE_MODULE ? 'src/index.' + configContent.BASE_MODULE + '.html' : 'src/index.mempool.html';
try {
fs.copyFileSync(indexFilePath, 'src/index.html');
console.log('Copied ' + indexFilePath + ' to src/index.html');
} catch (e) {
console.log('Error copying the index file');
throw new Error(e);
}
try {
const packageJson = fs.readFileSync('package.json');
packetJsonVersion = JSON.parse(packageJson).version;