diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-28 12:51:08 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-28 12:51:08 +0800 |
commit | 50299600c0134f00c7f8e4fe6b599987596c6dc5 (patch) | |
tree | 7d92c614788dc6f8b846942e44d3feaf4b4c3974 | |
parent | 43ed08ffecb6a9b571e8df401d99f0432f04c856 (diff) | |
download | crupest-50299600c0134f00c7f8e4fe6b599987596c6dc5.tar.gz crupest-50299600c0134f00c7f8e4fe6b599987596c6dc5.tar.bz2 crupest-50299600c0134f00c7f8e4fe6b599987596c6dc5.zip |
magic: rename file and gen to result dir.
-rw-r--r-- | deno/tools/geosite.ts (renamed from deno/tools/generate-geosite-rules.ts) | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/deno/tools/generate-geosite-rules.ts b/deno/tools/geosite.ts index bfa53ba..3aabec2 100644 --- a/deno/tools/generate-geosite-rules.ts +++ b/deno/tools/geosite.ts @@ -1,4 +1,3 @@ -const PROXY_NAME = "node-select"; const ATTR = "cn"; const REPO_NAME = "domain-list-community"; const URL = @@ -152,8 +151,10 @@ if (import.meta.main) { const rules = extract(SITES, provider); const [has, notHas] = toNewFormat(rules, ATTR); - const hasFile = tmpDir + "/has-rule"; - const notHasFile = tmpDir + "/not-has-rule"; + const resultDir = tmpDir + "/result"; + Deno.mkdirSync(resultDir); + const hasFile = resultDir + "/has-rule"; + const notHasFile = resultDir + "/not-has-rule"; console.log("Write result to: " + hasFile + " , " + notHasFile); Deno.writeTextFileSync(hasFile, has); Deno.writeTextFileSync(notHasFile, notHas); |