Merge pull request #79 from hormelcookies/remove-generated-files

Remove generated js files
This commit is contained in:
JeanOUINA 2020-10-20 10:55:38 +02:00 committed by GitHub
commit d0b3b73a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 21 additions and 44693 deletions

6
.gitignore vendored
View File

@ -108,7 +108,6 @@ builds
# must build typescript itself
dist
!BetterDiscordApp/dist
distApp
@ -121,3 +120,8 @@ discord-webrtc_0
# VS Code stuff
.vscode
# Compiled JS files
LightcordApi/js
DiscordJS/js
BetterDiscordApp/dist

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +0,0 @@
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,12 @@
const spawn = require("cross-spawn")
const { mkdirSync, existsSync } = require("fs")
const { join } = require("path")
/** Main Project */
spawnSync("tsc")
if (!existsSync(join(__dirname, "BetterDiscordApp", "dist"))){
mkdirSync(join(__dirname, "BetterDiscordApp", "dist"))
}
/** BetterDiscord */
spawnSync("npm run build", join(__dirname, "BetterDiscordApp"))
spawnSync("npm run build-prod", join(__dirname, "BetterDiscordApp"))

View File

@ -22,15 +22,23 @@ var args = process.argv.slice(2);
let dirsToRemove;
const node_modules = glob.sync("+(**/node_modules|node_modules)", {absolute:true, onlyDirectories:true, cwd:projectDir})
const dist = join(projectDir, "dist");
const distApp = join(projectDir, "distApp");
const builds = join(projectDir, "builds");
const build_dirs = [
join(projectDir, "dist"),
join(projectDir, "distApp"),
join(projectDir, "builds"),
join(projectDir, "LightcordApi", "js"),
join(projectDir, "LightcordApi", "dist"),
join(projectDir, "DiscordJS", "js"),
join(projectDir, "DiscordJS", "dist"),
join(projectDir, "BetterDiscordApp", "js"),
join(projectDir, "BetterDiscordApp", "dist"),
]
// regular clean means removing only node_modules
dirsToRemove = node_modules;
// clean all means removing all dirs.
if (args[0] === "--all"){
dirsToRemove = node_modules.concat([dist, distApp, builds])
dirsToRemove = dirsToRemove.concat(build_dirs)
}
dirsToRemove.forEach((dir)=>{