more things

This commit is contained in:
Jake Potrebic 2020-09-23 19:50:12 -07:00 committed by MiniDigger
parent d86d0a3c82
commit 4db1211a30
10 changed files with 40 additions and 28 deletions

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
plugins: { plugins: {
'autoprefixer': true autoprefixer: true
} }
} };

View File

@ -1,4 +1,5 @@
import $ from "jquery"; import $ from "jquery";
import "bootstrap/js/dist/modal"
import diff_match_patch from "diff-match-patch"; import diff_match_patch from "diff-match-patch";
//=====> DOCUMENT READY //=====> DOCUMENT READY

View File

@ -1,4 +1,5 @@
import $ from "jquery"; import $ from "jquery";
import "bootstrap/js/dist/modal"
import {toggleSpinner} from "@/utils"; import {toggleSpinner} from "@/utils";
//=====> CONSTANTS //=====> CONSTANTS

View File

@ -2,7 +2,7 @@ import $ from "jquery";
import ClipboardJS from "clipboard"; import ClipboardJS from "clipboard";
import hljs from "highlight.js"; import hljs from "highlight.js";
import {initTooltips, scrollToAnchor, toggleSpinner} from "@/utils"; import {initTooltips, scrollToAnchor, toggleSpinner} from "@/utils";
import "webpack-jquery-ui/tooltip"; import "bootstrap/js/dist/tooltip"
//=====> CONSTANTS //=====> CONSTANTS
@ -14,7 +14,7 @@ clipboardManager.on("success", function() {
.tooltip({ title: "Copied!", placement: "bottom", trigger: "manual" }) .tooltip({ title: "Copied!", placement: "bottom", trigger: "manual" })
.tooltip("show"); .tooltip("show");
setTimeout(function() { setTimeout(function() {
element.tooltip("destroy"); element.tooltip("dispose");
}, 2200); }, 2200);
}); });

View File

@ -1,4 +1,5 @@
import $ from "jquery"; import $ from "jquery";
import "bootstrap/js/dist/tooltip"
import filesize from "filesize"; import filesize from "filesize";
//=====> CONSTANTS //=====> CONSTANTS
@ -79,7 +80,7 @@ function reset() {
bs.find("[data-fa-i2svg]") bs.find("[data-fa-i2svg]")
.removeClass("fa-exclamation-circle") .removeClass("fa-exclamation-circle")
.addClass("fa-file-archive") .addClass("fa-file-archive")
.tooltip("destroy"); .tooltip("dispose");
} }
return alert; return alert;
} }
@ -143,7 +144,7 @@ $(function() {
var newTitle = "Upload plugin"; var newTitle = "Upload plugin";
button button
.tooltip("option", "hide", false) .tooltip("hide")
.data("original-title", newTitle) .data("original-title", newTitle)
.tooltip(); .tooltip();
} }

View File

@ -1,4 +1,5 @@
import $ from "jquery"; import $ from "jquery";
import "bootstrap/js/dist/modal"
import {initChannelManager} from "@/js/channelManage"; import {initChannelManager} from "@/js/channelManage";
//=====> EXTERNAL CONSTANTS //=====> EXTERNAL CONSTANTS

View File

@ -90,4 +90,4 @@ export const scrollToAnchor = function(anchor) {
return true; return true;
}; };
export const KEY_ENTER = 13; export const KEY_ENTER = 13;

View File

@ -1,7 +1,6 @@
const path = require("path"); const path = require("path");
const fs = require("fs"); const fs = require("fs");
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const autoprefixer = require('autoprefixer')
const sourceDir = path.resolve(__dirname, "src"); const sourceDir = path.resolve(__dirname, "src");
const entryDir = path.resolve(sourceDir, "entrypoints"); const entryDir = path.resolve(sourceDir, "entrypoints");
@ -33,23 +32,33 @@ module.exports = {
config.entry(file.replace(".js", "")).add(path.resolve(jsDir, file)); config.entry(file.replace(".js", "")).add(path.resolve(jsDir, file));
} }
config.module.rules.delete('css') config.module.rules.delete("css");
config.module.rules.delete('scss') config.module.rules.delete("scss");
config.plugin('mini-css-extract').use(MiniCssExtractPlugin, [{filename: 'css/[name].css'}]) config
.plugin("mini-css-extract")
.use(MiniCssExtractPlugin, [{ filename: "css/[name].css" }]);
config.module.rule('css') config.module
.test(/\.(s?)css$/i) .rule("css")
.use('mini-css-extract') .test(/\.(s?)css$/i)
.loader(MiniCssExtractPlugin.loader) .use("mini-css-extract")
.options({ .loader(MiniCssExtractPlugin.loader)
hmr: process.env.NODE_ENV === 'development', .options({
reloadAll: true, hmr: process.env.NODE_ENV === "development",
publicPath: '/css/' reloadAll: true,
}).end() publicPath: "/css/"
.use('css-loader').loader('css-loader').end() })
.use('postcss-loader').loader('postcss-loader').end() .end()
.use('sass-loader').loader('sass-loader').end() .use("css-loader")
.loader("css-loader")
.end()
.use("postcss-loader")
.loader("postcss-loader")
.end()
.use("sass-loader")
.loader("sass-loader")
.end();
}, },
outputDir: outputDir, outputDir: outputDir,

View File

@ -122,7 +122,7 @@ showFooter: Boolean = true, noContainer: Boolean = false, additionalMeta: Html =
<#-- <script type="text/javascript" src="<@hangar.url "lib/clipboard/dist/clipboard.min.js" />"></script>--> <#-- <script type="text/javascript" src="<@hangar.url "lib/clipboard/dist/clipboard.min.js" />"></script>-->
<#-- <script type="text/javascript" src="<@hangar.url "highlight/highlight.pack.js" />"></script>--> <#-- <script type="text/javascript" src="<@hangar.url "highlight/highlight.pack.js" />"></script>-->
<#-- <script type="text/javascript" src="<@hangar.url "jquery-ui/jquery-ui.min.js" />"></script>--> <#-- <script type="text/javascript" src="<@hangar.url "jquery-ui/jquery-ui.min.js" />"></script>-->
<#-- <script type="text/javascript" src="<@hangar.url "build/js/main.js" />"></script>--> <script type="text/javascript" src="<@hangar.url "build/js/main.js" />"></script>
<#-- <script type="text/javascript" src="<@hangar.url "build/js/apiRequests.js" />"></script>--> <#-- <script type="text/javascript" src="<@hangar.url "build/js/apiRequests.js" />"></script>-->
${additionalScripts} ${additionalScripts}

View File

@ -3,7 +3,6 @@
<#import "*/layout/base.ftlh" as base /> <#import "*/layout/base.ftlh" as base />
<#assign scriptsVar> <#assign scriptsVar>
<script type="text/javascript" src="<@hangar.url "diff-match-patch/javascript/diff_match_patch.js" />"></script>
<script type="text/javascript" src="<@hangar.url "build/js/actionLog.js" />"></script> <script type="text/javascript" src="<@hangar.url "build/js/actionLog.js" />"></script>
</#assign> </#assign>