/**
* 注入 nightly 分析脚本
*
* 请确保该脚本仅在nightly环境下生效
*
* 目前在github 构建action中使用
*/
const fs = require('fs');
const path = require('path');
const templatePath = path.resolve(__dirname, '../assets/template.html');
console.log('templatePath', templatePath);
function appendScript(script) {
let template = fs.readFileSync(templatePath, {
encoding: 'utf-8',
});
template = template.replace('', script + '');
fs.writeFileSync(templatePath, template);
}
// frontjs
// const script = ``;
// umami
appendScript(
``
);
// tianji
appendScript(
``
);