MCPcopy
hub / github.com/zxlie/FeHelper / buildManifest

Function buildManifest

gulpfile.js:82–89  ·  view source on GitHub ↗
(browser, outputDir)

Source from the content-addressed store, hash-verified

80
81// 基于唯一的 apps/manifest.json 生成目标浏览器的 manifest 并写入 outputDir
82function buildManifest(browser, outputDir) {
83 const srcPath = path.resolve('apps/manifest.json');
84 const base = JSON.parse(fs.readFileSync(srcPath, 'utf-8'));
85 const patcher = BROWSER_PATCHES[browser];
86 if (!patcher) throw new Error(`Unknown browser target: ${browser}`);
87 const finalManifest = patcher(base);
88 fs.writeFileSync(path.join(outputDir, 'manifest.json'), JSON.stringify(finalManifest));
89}
90
91// 清理输出目录
92function cleanOutput(outputDir = 'output-chrome') {

Callers 3

firefoxPreprocessFunction · 0.85
chromePreprocessFunction · 0.85
edgePreprocessFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected