mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-03 02:28:23 +08:00
feat(radar): build JSON-versioned radar rules (#9756)
with `target` functions filtered out, of course Signed-off-by: Rongrong <i@rong.moe>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const target = path.join(__dirname, '../../assets/build/radar-rules.js');
|
||||
const targetJs = path.join(__dirname, '../../assets/build/radar-rules.js');
|
||||
const targetJson = path.join(__dirname, '../../assets/build/radar-rules.json');
|
||||
const radar = require(path.join(__dirname, '../../lib/radar.js'));
|
||||
|
||||
fs.writeFileSync(target, radar.toSource());
|
||||
fs.writeFileSync(targetJs, radar.toSource());
|
||||
fs.writeFileSync(targetJson, JSON.stringify(radar.rules, undefined, 2));
|
||||
|
||||
Reference in New Issue
Block a user