Merge pull request #79 from hormelcookies/remove-generated-files
Remove generated js files
This commit is contained in:
commit
d0b3b73a85
|
@ -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
1753
DiscordJS/js/main.js
1753
DiscordJS/js/main.js
File diff suppressed because one or more lines are too long
28362
LightcordApi/js/main.js
28362
LightcordApi/js/main.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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
|
@ -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"))
|
||||
|
|
|
@ -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)=>{
|
||||
|
|
Loading…
Reference in New Issue