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