Files
lnreader-plugins/scripts/clearMultisrc.ts
T
nyagami cf8db556a6 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
2024-01-07 17:34:39 +05:30

16 lines
503 B
TypeScript

import * as path from 'path'
import * as fs from 'fs'
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));
}
})
})
}
}