mirror of
https://github.com/Lightcord/Lightcord.git
synced 2025-04-12 00:55:40 +02:00
Sync with rauenzi/BetterDiscordApp 9d31dfe
use dist
This commit is contained in:
parent
df6c9c4203
commit
99a2336249
File diff suppressed because it is too large
Load Diff
1
BetterDiscordApp/css/main.min.css
vendored
1
BetterDiscordApp/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,33 +1,33 @@
|
||||
const gulp = require("gulp");
|
||||
const rename = require("gulp-rename");
|
||||
const minify = require("gulp-babel-minify");
|
||||
const csso = require("gulp-csso");
|
||||
|
||||
gulp.task("minify-js", minifyJS);
|
||||
gulp.task("minify-css", minifyCSS);
|
||||
|
||||
gulp.task("watch-js", function() {
|
||||
return gulp.watch(["./js/main.js"], minifyJS);
|
||||
});
|
||||
|
||||
gulp.task("watch-css", function() {
|
||||
return gulp.watch(["./css/main.css"], minifyCSS);
|
||||
});
|
||||
|
||||
gulp.task("watch", function() {
|
||||
return gulp.watch(["./js/main.js", "./css/main.css"], gulp.series(minifyJS, minifyCSS));
|
||||
});
|
||||
|
||||
function minifyJS() {
|
||||
return gulp.src("./js/main.js")
|
||||
.pipe(minify({mangle: {keepClassName: true}}))
|
||||
.pipe(rename("main.min.js"))
|
||||
.pipe(gulp.dest("./js"));
|
||||
}
|
||||
|
||||
function minifyCSS() {
|
||||
return gulp.src("./css/main.css")
|
||||
.pipe(csso({restructure: false}))
|
||||
.pipe(rename("main.min.css"))
|
||||
.pipe(gulp.dest("./css"));
|
||||
const gulp = require("gulp");
|
||||
const rename = require("gulp-rename");
|
||||
const minify = require("gulp-babel-minify");
|
||||
const csso = require("gulp-csso");
|
||||
|
||||
gulp.task("minify-js", minifyJS);
|
||||
gulp.task("minify-css", minifyCSS);
|
||||
|
||||
gulp.task("watch-js", function() {
|
||||
return gulp.watch(["./dist/index.js"], minifyJS);
|
||||
});
|
||||
|
||||
gulp.task("watch-css", function() {
|
||||
return gulp.watch(["./dist/style.css"], minifyCSS);
|
||||
});
|
||||
|
||||
gulp.task("watch", function() {
|
||||
return gulp.watch(["./dist/index.js", "./dist/style.css"], gulp.series(minifyJS, minifyCSS));
|
||||
});
|
||||
|
||||
function minifyJS() {
|
||||
return gulp.src("./dist/index.js")
|
||||
.pipe(minify({mangle: {keepClassName: true}}))
|
||||
.pipe(rename("index.min.js"))
|
||||
.pipe(gulp.dest("./dist"));
|
||||
}
|
||||
|
||||
function minifyCSS() {
|
||||
return gulp.src("./dist/style.css")
|
||||
.pipe(csso({restructure: false}))
|
||||
.pipe(rename("style.min.css"))
|
||||
.pipe(gulp.dest("./dist"));
|
||||
}
|
File diff suppressed because one or more lines are too long
1
BetterDiscordApp/js/main.min.js
vendored
1
BetterDiscordApp/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,46 +1,46 @@
|
||||
{
|
||||
"name": "bandagedbd",
|
||||
"version": "0.2.3",
|
||||
"description": "Enhances Discord adding functionality and themes.",
|
||||
"main": "js/main.js",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --colors",
|
||||
"watch": "webpack --progress --colors --watch",
|
||||
"build-prod": "webpack --progress --colors --mode production -o js/main.min.js --devtool none",
|
||||
"watch-prod": "webpack --progress --colors --watch --mode production -o js/main.min.js --devtool none",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"minify": "gulp minify-js && gulp minify-css",
|
||||
"minify-js": "gulp minify-js",
|
||||
"minify-css": "gulp minify-css",
|
||||
"watch-js": "gulp watch-js",
|
||||
"watch-css": "gulp watch-css"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rauenzi/BetterDiscordApp.git"
|
||||
},
|
||||
"author": "rauenzi",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/rauenzi/BetterDiscordApp/issues"
|
||||
},
|
||||
"homepage": "https://github.com/rauenzi/BetterDiscordApp#readme",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"babel-loader": "^8.0.6",
|
||||
"circular-dependency-plugin": "^5.0.2",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-babel-minify": "^0.5.1",
|
||||
"gulp-csso": "^3.0.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-cli": "^3.2.3",
|
||||
"@types/react-dom": "^16.9.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.13.1"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "bandagedbd",
|
||||
"version": "0.2.3",
|
||||
"description": "Enhances Discord adding functionality and themes.",
|
||||
"main": "js/main.js",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --colors",
|
||||
"watch": "webpack --progress --colors --watch",
|
||||
"build-prod": "webpack --progress --colors --mode production -o dist/index.min.js --devtool none",
|
||||
"watch-prod": "webpack --progress --colors --watch --mode production -o dist/index.min.js --devtool none",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"minify": "gulp minify-js && gulp minify-css",
|
||||
"minify-js": "gulp minify-js",
|
||||
"minify-css": "gulp minify-css",
|
||||
"watch-js": "gulp watch-js",
|
||||
"watch-css": "gulp watch-css"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rauenzi/BetterDiscordApp.git"
|
||||
},
|
||||
"author": "rauenzi",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/rauenzi/BetterDiscordApp/issues"
|
||||
},
|
||||
"homepage": "https://github.com/rauenzi/BetterDiscordApp#readme",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"babel-loader": "^8.0.6",
|
||||
"circular-dependency-plugin": "^5.0.2",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-babel-minify": "^0.5.1",
|
||||
"gulp-csso": "^3.0.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-cli": "^3.2.3",
|
||||
"@types/react-dom": "^16.9.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.13.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,74 +1,74 @@
|
||||
const path = require("path");
|
||||
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
target: "node",
|
||||
devtool: "inline-source-map",
|
||||
entry: "./src/index.js",
|
||||
output: {
|
||||
filename: "main.js",
|
||||
path: path.resolve(__dirname, "js"),
|
||||
library: "BetterDiscord",
|
||||
libraryTarget: "commonjs2"
|
||||
},
|
||||
externals: {
|
||||
electron: `electron`,
|
||||
fs: `fs`,
|
||||
path: `path`,
|
||||
events: `events`,
|
||||
rimraf: `rimraf`,
|
||||
yauzl: `yauzl`,
|
||||
mkdirp: `mkdirp`,
|
||||
request: `request`,
|
||||
"node-fetch": "node-fetch"
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".js", ".jsx"],
|
||||
modules: [
|
||||
path.resolve("src", "builtins"),
|
||||
path.resolve("src", "modules")
|
||||
],
|
||||
alias: {
|
||||
react$: path.resolve(__dirname, "src", "react.js"),
|
||||
"react-dom$": path.resolve(__dirname, "src", "react-dom.js")
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: "babel-loader",
|
||||
exclude: /node_modules/,
|
||||
query: {
|
||||
presets: [["@babel/env", {
|
||||
targets: {
|
||||
node: "12.8.1",
|
||||
chrome: "78"
|
||||
}
|
||||
}], "@babel/react"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CircularDependencyPlugin({
|
||||
// exclude detection of files based on a RegExp
|
||||
exclude: /a\.js|node_modules/,
|
||||
// add errors to webpack instead of warnings
|
||||
// failOnError: true,
|
||||
// set the current working directory for displaying module paths
|
||||
cwd: process.cwd(),
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
compress: {drop_debugger:false}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
const path = require("path");
|
||||
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
target: "node",
|
||||
devtool: "inline-source-map",
|
||||
entry: "./src/index.js",
|
||||
output: {
|
||||
filename: "index.js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
library: "BetterDiscord",
|
||||
libraryTarget: "commonjs2"
|
||||
},
|
||||
externals: {
|
||||
electron: `electron`,
|
||||
fs: `fs`,
|
||||
path: `path`,
|
||||
events: `events`,
|
||||
rimraf: `rimraf`,
|
||||
yauzl: `yauzl`,
|
||||
mkdirp: `mkdirp`,
|
||||
request: `request`,
|
||||
"node-fetch": "node-fetch"
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".js", ".jsx"],
|
||||
modules: [
|
||||
path.resolve("src", "builtins"),
|
||||
path.resolve("src", "modules")
|
||||
],
|
||||
alias: {
|
||||
react$: path.resolve(__dirname, "src", "react.js"),
|
||||
"react-dom$": path.resolve(__dirname, "src", "react-dom.js")
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: "babel-loader",
|
||||
exclude: /node_modules/,
|
||||
query: {
|
||||
presets: [["@babel/env", {
|
||||
targets: {
|
||||
node: "12.8.1",
|
||||
chrome: "78"
|
||||
}
|
||||
}], "@babel/react"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CircularDependencyPlugin({
|
||||
// exclude detection of files based on a RegExp
|
||||
exclude: /a\.js|node_modules/,
|
||||
// add errors to webpack instead of warnings
|
||||
// failOnError: true,
|
||||
// set the current working directory for displaying module paths
|
||||
cwd: process.cwd(),
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
compress: {drop_debugger:false}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
};
|
@ -157,7 +157,7 @@ async function privateInit(){
|
||||
|
||||
let constants = ModuleLoader.get(m=>m.API_HOST)[0]
|
||||
let dispatcher = ModuleLoader.get(m=>m.Dispatcher&&m.default&&m.default.dispatch)[0].default
|
||||
require("../../../../../BetterDiscordApp/css/main.css")
|
||||
require("../../../../../BetterDiscordApp/dist/style.css")
|
||||
require("./lightcord.css")
|
||||
|
||||
function getCurrentHypesquad(){
|
||||
@ -351,7 +351,7 @@ async function privateInit(){
|
||||
dispatcher.subscribe(constants.ActionTypes.CONNECTION_OPEN || "CONNECTION_OPEN", onConn)
|
||||
}*/
|
||||
|
||||
const BetterDiscord = window.BetterDiscord = window.mainCore = new(require("../../../../../BetterDiscordApp/js/main.js").default)(BetterDiscordConfig, require("./betterdiscord"))
|
||||
const BetterDiscord = window.BetterDiscord = window.mainCore = new(require("../../../../../BetterDiscordApp/dist/index.js").default)(BetterDiscordConfig, require("./betterdiscord"))
|
||||
|
||||
const Utils = window.Lightcord.BetterDiscord.Utils
|
||||
const DOMTools = window.Lightcord.BetterDiscord.DOM
|
||||
|
Loading…
x
Reference in New Issue
Block a user