refactor: Remove ignore generated multisrc .ts files when committing (#678)

* update clear multisrc script

* ignore generated multisrc .ts files

* Squashed commit of the following:

commit b3ef1a83a9
Author: Rajarshee Chatterjee <rajarshee.adm@gmail.com>
Date:   Sun Jan 7 16:56:12 2024 +0530

    plugins: update json files for new plugins (#679)

commit f36e93d0a6
Author: Rider21 <58046032+Rider21@users.noreply.github.com>
Date:   Sun Jan 7 14:25:02 2024 +0300

    fix: Update Plugins (#677)

    * typo

    * update

    * fix

    * fix

    * update

    * ifreedom

    * fix

    * fix ranobelib

    * ...

commit 8a267561cb
Author: Rajarshee Chatterjee <rajarshee.adm@gmail.com>
Date:   Sun Jan 7 16:54:09 2024 +0530

    plugins: update json files for new plugins (#673)

* clear generated multisrc files

* generate .js files
This commit is contained in:
nyagami
2024-01-07 19:04:39 +07:00
committed by GitHub
parent b3ef1a83a9
commit cf8db556a6
59 changed files with 726 additions and 14073 deletions
+12 -9
View File
@@ -1,12 +1,15 @@
import * as path from 'path'
import * as fs from 'fs'
const pluginDir = 'plugins'
fs.readdirSync(pluginDir).forEach(lang => {
const langDir = path.join(pluginDir, lang);
fs.readdirSync(langDir).forEach(plugin => {
if(plugin.endsWith('.ts') && plugin.includes("[")){
fs.unlinkSync(path.join(langDir, plugin));
}
})
})
for (let pluginDir of ['plugins', path.join('.js', 'plugins')]){
if(fs.existsSync(pluginDir)){
fs.readdirSync(pluginDir).forEach(lang => {
const langDir = path.join(pluginDir, lang);
fs.readdirSync(langDir).forEach(plugin => {
if(plugin.includes("[") && plugin.includes("]")){
fs.unlinkSync(path.join(langDir, plugin));
}
})
})
}
}
+1
View File
@@ -57,6 +57,7 @@ const run = async () => {
const success = await generate(name);
if (success) console.log(`[${name}] OK`);
}
console.log('Generating: .js files');
};
run();