mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
v0.3.0
This commit is contained in:
11
scripts/download.js
vendored
11
scripts/download.js
vendored
@@ -2,8 +2,8 @@ const fs = require('fs');
|
||||
|
||||
const argv = process.argv.slice(2);
|
||||
|
||||
async function init() {
|
||||
const content = fs.readFileSync('README.md', 'utf8').split('\n');
|
||||
async function rewrite(filename) {
|
||||
const content = fs.readFileSync(filename, 'utf8').split('\n');
|
||||
const startRe = /<!-- download start -->/;
|
||||
const endRe = /<!-- download end -->/;
|
||||
|
||||
@@ -20,7 +20,12 @@ async function init() {
|
||||
}
|
||||
}
|
||||
|
||||
fs.writeFileSync('README.md', content.join('\n'), 'utf8');
|
||||
fs.writeFileSync(filename, content.join('\n'), 'utf8');
|
||||
}
|
||||
|
||||
async function init() {
|
||||
rewrite('README.md');
|
||||
rewrite('README-ZH.md');
|
||||
}
|
||||
|
||||
init().catch(console.error);
|
||||
Reference in New Issue
Block a user