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