restructure
This commit is contained in:
parent
8f2ece3678
commit
ec33b23483
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"injectorVersion": "0.3.2"
|
||||
}
|
|
@ -5,12 +5,12 @@ const csso = require("gulp-csso");
|
|||
gulp.task("minify-css", minifyCSS);
|
||||
|
||||
gulp.task("watch-css", function() {
|
||||
return gulp.watch(["./css/main.css"], minifyCSS);
|
||||
return gulp.watch(["./src/styles/index.css"], minifyCSS);
|
||||
});
|
||||
|
||||
function minifyCSS() {
|
||||
return gulp.src("./css/main.css")
|
||||
return gulp.src("./src/styles/index.css")
|
||||
.pipe(csso({restructure: false}))
|
||||
.pipe(rename("main.min.css"))
|
||||
.pipe(gulp.dest("./css"));
|
||||
.pipe(rename("style.min.css"))
|
||||
.pipe(gulp.dest("./dist"));
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "bandagedbd",
|
||||
"version": "0.2.3",
|
||||
"version": "1.0.0",
|
||||
"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",
|
||||
"build-prod": "webpack --progress --colors --mode production -o dist/index.min.js --devtool none",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"minify": "npm run build-prod && npm run minify-css",
|
||||
"minify-css": "gulp minify-css",
|
||||
|
|
|
@ -42,9 +42,9 @@ export default new class Core {
|
|||
{
|
||||
name: "bd-stylesheet",
|
||||
type: "style",
|
||||
url: "//cdn.staticaly.com/gh/{{repo}}/BetterDiscordApp/{{hash}}/css/main{{minified}}.css",
|
||||
backup: "//rauenzi.github.io/BetterDiscordApp/css/main{{minified}}.css",
|
||||
local: "{{localServer}}/BetterDiscordApp/css/main.css"
|
||||
url: "//cdn.staticaly.com/gh/{{repo}}/BetterDiscordApp/{{hash}}/dist/style.css",
|
||||
backup: "//rauenzi.github.io/BetterDiscordApp/dist/style.css",
|
||||
local: "{{localServer}}/BetterDiscordApp/dist/style.css"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ export default new class Core {
|
|||
|
||||
async loadDependencies() {
|
||||
for (const data of this.dependencies) {
|
||||
const url = Utilities.formatString((Config.local && data.local != null) ? data.local : data.url, {repo: Config.repo, hash: Config.hash, minified: Config.minified ? ".min" : "", localServer: Config.localServer});
|
||||
const url = Utilities.formatString((Config.local && data.local != null) ? data.local : data.url, {repo: Config.repo, hash: Config.hash, localServer: Config.localServer});
|
||||
Logger.log(`Startup`, `Loading Resource (${url})`);
|
||||
const injector = (data.type == "script" ? DOMManager.injectScript : DOMManager.linkStyle).bind(DOMManager);
|
||||
try {
|
||||
|
|
|
@ -7,8 +7,8 @@ module.exports = {
|
|||
devtool: "eval-source-map",
|
||||
entry: "./src/index.js",
|
||||
output: {
|
||||
filename: "main.js",
|
||||
path: path.resolve(__dirname, "js"),
|
||||
filename: "index.js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
library: "Core",
|
||||
libraryTarget: "var",
|
||||
libraryExport: "default"
|
||||
|
|
Loading…
Reference in New Issue