diff --git a/INSTALL.md b/INSTALL.md index 0be81c02..097a5d44 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -127,7 +127,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172 +[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/README.md b/README.md index 2eb94d7f..743cb617 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ -# 🤖 P3X Gitlist - A decorated enhanced elegant, feature rich and modern private git ui repository viewer v2020.10.172 +# 🤖 P3X Gitlist - A decorated enhanced elegant, feature rich and modern private git ui repository viewer v2020.10.182 @@ -167,7 +167,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172 +[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/artifacts/php-7.2-ubuntu.md b/artifacts/php-7.2-ubuntu.md index cec542da..61930c63 100644 --- a/artifacts/php-7.2-ubuntu.md +++ b/artifacts/php-7.2-ubuntu.md @@ -31,7 +31,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172 +[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/artifacts/screenshots.md b/artifacts/screenshots.md index 8b981440..1cb02f3f 100644 --- a/artifacts/screenshots.md +++ b/artifacts/screenshots.md @@ -36,7 +36,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172 +[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/change-break.md b/change-break.md index db1fe70b..7432d539 100644 --- a/change-break.md +++ b/change-break.md @@ -61,7 +61,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172 +[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/changelog.md b/changelog.md index ce03a074..92927a1e 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,9 @@ [//]: #@corifeus-header:end +## v2020.10.179 +* BUILD: Splitted vendor modules packages with Webpack using `import` using pre-fetch. + ## v2020.10.170 * BUILD: Kept older versions in the release. @@ -394,7 +397,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172 +[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/package.json b/package.json index 23abb2b6..c8630fa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p3x-gitlist", - "version": "2020.10.173", + "version": "2020.10.183", "corifeus": { "prod-dir": "prod", "css-postfix": "8940b9c0b13e7fb3feb0a90e8db862ec8ab4763b0b7e8f438de43d7ae7b4145a", @@ -42,15 +42,15 @@ "html-loader": "^1.3.2", "html-webpack-plugin": "^4.5.0", "less-loader": "^7.0.2", - "mini-css-extract-plugin": "^1.1.1", + "mini-css-extract-plugin": "^1.2.0", "on-build-webpack": "^0.1.0", "optimize-css-assets-webpack-plugin": "^5.0.4", "postcss-safe-parser": "^5.0.2", "source-map-loader": "^1.1.1", "style-loader": "^2.0.0", - "terser-webpack-plugin": "^5.0.0", + "terser-webpack-plugin": "^5.0.1", "url-loader": "^4.1.1", - "webpack": "^5.1.3", + "webpack": "^5.2.0", "webpack-cli": "^4.1.0", "worker-loader": "^3.0.5" }, @@ -61,7 +61,7 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.15.1", "bootstrap": "^3.4.1", - "codemirror": "^5.58.1", + "codemirror": "^5.58.2", "highlight.js": "^10.3.1", "is-string-int": "^1.0.1", "jquery": "=3.4.1", diff --git a/src/browser/bundle.js b/src/browser/bundle.js index 55c16403..624db864 100644 --- a/src/browser/bundle.js +++ b/src/browser/bundle.js @@ -2,26 +2,9 @@ window.gitlist.codemirrorTheme = { light: 'idea', dark: 'dracula', } -require('codemirror/lib/codemirror.css') -require(`codemirror/theme/idea.css`) -require(`codemirror/theme/dracula.css`) - - -//require('../less/style.less') require('@fortawesome/fontawesome-free/css/all.css') -/* -//console.log(fontawesome); -//console.log(fontawesome.default); -const faSolid = require('@fortawesome/fontawesome-free-solid')['default'] -const faRegular = require('@fortawesome/fontawesome-free-regular')['default'] -const faBrands = require('@fortawesome/fontawesome-free-brands')['default'] -fontawesome.library.add(faSolid) -fontawesome.library.add(faRegular) -fontawesome.library.add(faBrands) -*/ - window.gitlist.snapckbarLongTimeout = 20000; global.jQuery = require('jquery') global.$ = global.jQuery; @@ -29,56 +12,6 @@ require('snackbarjs'); require('jquery.redirect'); require('bootstrap'); -global.marked = require('marked') -global.htmlEncode = require('js-htmlencode') -global.CodeMirror = require('codemirror'); -require('codemirror/addon/selection/active-line.js') -require('codemirror/addon/mode/simple'); -require('codemirror/addon/mode/multiplex'); -require('codemirror/mode/cmake/cmake'); -require('codemirror/mode/clike/clike'); -require('codemirror/mode/css/css'); -require('codemirror/mode/dockerfile/dockerfile'); -require('codemirror/mode/go/go'); -require('codemirror/mode/handlebars/handlebars'); -require('codemirror/mode/htmlmixed/htmlmixed'); -require('codemirror/mode/javascript/javascript'); -require('codemirror/mode/jsx/jsx'); -require('codemirror/mode/perl/perl'); -require('codemirror/mode/php/php'); -require('codemirror/mode/powershell/powershell'); -require('codemirror/mode/python/python'); -require('codemirror/mode/properties/properties'); -require('codemirror/mode/ruby/ruby'); -require('codemirror/mode/sass/sass'); -require('codemirror/mode/shell/shell'); -require('codemirror/mode/vbscript/vbscript'); -require('codemirror/mode/groovy/groovy'); -require('codemirror/mode/erlang/erlang'); -require('codemirror/mode/ecl/ecl'); -require('codemirror/mode/coffeescript/coffeescript'); -require('codemirror/mode/clojure/clojure'); -require('codemirror/mode/diff/diff'); -require('codemirror/mode/smalltalk/smalltalk'); -require('codemirror/mode/rust/rust'); -require('codemirror/mode/lua/lua'); -require('codemirror/mode/haskell/haskell'); -require('codemirror/mode/markdown/markdown'); -require('codemirror/mode/scheme/scheme'); -require('codemirror/mode/r/r'); -require('codemirror/mode/rst/rst'); -require('codemirror/mode/ntriples/ntriples'); -require('codemirror/mode/pascal/pascal'); -require('codemirror/mode/sql/sql'); -require('codemirror/mode/swift/swift'); -require('codemirror/mode/twig/twig'); -require('codemirror/mode/vue/vue'); -require('codemirror/mode/xml/xml'); -require('codemirror/mode/xquery/xquery'); -require('codemirror/mode/yaml/yaml'); - -require('eve-raphael/eve.js'); -global.Raphael = require('raphael') global.twemoji = require('twemoji').default const prodDir = require('../../package').corifeus["prod-dir"]; global.twemoji.base = `${prodDir}/twemoji/`; diff --git a/src/browser/codemirror.js b/src/browser/codemirror.js new file mode 100644 index 00000000..70cf12fa --- /dev/null +++ b/src/browser/codemirror.js @@ -0,0 +1,49 @@ +require('codemirror/lib/codemirror.css') +require(`codemirror/theme/idea.css`) +require(`codemirror/theme/dracula.css`) + +global.CodeMirror = require('codemirror'); +require('codemirror/addon/selection/active-line.js') +require('codemirror/addon/mode/simple'); +require('codemirror/addon/mode/multiplex'); +require('codemirror/mode/cmake/cmake'); +require('codemirror/mode/clike/clike'); +require('codemirror/mode/css/css'); +require('codemirror/mode/dockerfile/dockerfile'); +require('codemirror/mode/go/go'); +require('codemirror/mode/handlebars/handlebars'); +require('codemirror/mode/htmlmixed/htmlmixed'); +require('codemirror/mode/javascript/javascript'); +require('codemirror/mode/jsx/jsx'); +require('codemirror/mode/perl/perl'); +require('codemirror/mode/php/php'); +require('codemirror/mode/powershell/powershell'); +require('codemirror/mode/python/python'); +require('codemirror/mode/properties/properties'); +require('codemirror/mode/ruby/ruby'); +require('codemirror/mode/sass/sass'); +require('codemirror/mode/shell/shell'); +require('codemirror/mode/vbscript/vbscript'); +require('codemirror/mode/groovy/groovy'); +require('codemirror/mode/erlang/erlang'); +require('codemirror/mode/ecl/ecl'); +require('codemirror/mode/coffeescript/coffeescript'); +require('codemirror/mode/clojure/clojure'); +require('codemirror/mode/diff/diff'); +require('codemirror/mode/smalltalk/smalltalk'); +require('codemirror/mode/rust/rust'); +require('codemirror/mode/lua/lua'); +require('codemirror/mode/haskell/haskell'); +require('codemirror/mode/markdown/markdown'); +require('codemirror/mode/scheme/scheme'); +require('codemirror/mode/r/r'); +require('codemirror/mode/rst/rst'); +require('codemirror/mode/ntriples/ntriples'); +require('codemirror/mode/pascal/pascal'); +require('codemirror/mode/sql/sql'); +require('codemirror/mode/swift/swift'); +require('codemirror/mode/twig/twig'); +require('codemirror/mode/vue/vue'); +require('codemirror/mode/xml/xml'); +require('codemirror/mode/xquery/xquery'); +require('codemirror/mode/yaml/yaml'); diff --git a/src/browser/grunt/less.js b/src/browser/grunt/less.js index ca24e448..6225293d 100644 --- a/src/browser/grunt/less.js +++ b/src/browser/grunt/less.js @@ -13,7 +13,7 @@ const filesLessCache = `${cwd}/build/less/file-less.json`; const lessSettings = (grunt) => { return { options: { - sourceMap: true, + sourceMap: false, compress: true, }, get files() { diff --git a/src/browser/js/change-log.js b/src/browser/js/change-log.js index cee81295..dd1266f2 100644 --- a/src/browser/js/change-log.js +++ b/src/browser/js/change-log.js @@ -5,7 +5,7 @@ window.gitlist.changeLog = async () => { try { const response = await $.ajax('https://raw.githubusercontent.com/patrikx3/gitlist/master/changelog.md') const $changelogModalBody = $('#p3x-gitlist-modal-changelog-body') - changelogHtml = window.gitlist.renderMarkdown({ + changelogHtml = await window.gitlist.renderMarkdown({ markdown: response }) $changelogModalBody.html(changelogHtml); diff --git a/src/browser/js/commits-list.js b/src/browser/js/commits-list.js index e1a8a76c..abd23fb7 100644 --- a/src/browser/js/commits-list.js +++ b/src/browser/js/commits-list.js @@ -1,6 +1,6 @@ -$(() => { +$(async() => { - const constructMarkdown = () => { + const constructMarkdown = async() => { const $commitListTables = $('.p3x-gitlist-commits-list:not(.p3x-gitlist-commits-list-rendered)'); if ($commitListTables.length > 0) { @@ -14,7 +14,7 @@ $(() => { for (let markedItem of $markedItems) { //console.log(markedItem) const $markedItem = $(markedItem) - const html = window.gitlist.renderMarkdown({ + const html = await window.gitlist.renderMarkdown({ markdown: $markedItem.html() }) //console.log(html) @@ -24,6 +24,6 @@ $(() => { } } - constructMarkdown(); + await constructMarkdown(); window.gitlist.constructCommitsListConstructMarkdown = constructMarkdown; }) diff --git a/src/browser/js/file.js b/src/browser/js/file.js index 36f9ac06..f7994e21 100644 --- a/src/browser/js/file.js +++ b/src/browser/js/file.js @@ -1,4 +1,4 @@ -$(function () { +$(async function () { const Cookies = require('js-cookie') @@ -13,6 +13,12 @@ $(function () { return; } + await import( + /* webpackChunkName: "codemirror" */ + /* webpackPrefetch: true */ + '../codemirror' + ); + const $buttonDelete = $('#p3x-gitlist-file-delete') const $buttonDeleteSure = $('#p3x-gitlist-modal-delete-confirm') const $formDeleteForm = $('#p3x-gitlist-modal-delete-form') @@ -28,6 +34,7 @@ $(function () { } + $buttonDelete.click(() => { if (!window.gitlist.changeableCommit()) { return diff --git a/src/browser/js/markdown.js b/src/browser/js/markdown.js index dc191e58..69f66b92 100644 --- a/src/browser/js/markdown.js +++ b/src/browser/js/markdown.js @@ -1,130 +1,30 @@ -const hljs = require('highlight.js'); -hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml.js')); -hljs.registerLanguage('css', require('highlight.js/lib/languages/css.js')); -hljs.registerLanguage('cmake', require('highlight.js/lib/languages/cmake.js')); -hljs.registerLanguage('dockerfile', require('highlight.js/lib/languages/dockerfile.js')); -hljs.registerLanguage('Dockerfile', require('highlight.js/lib/languages/dockerfile.js')); -hljs.registerLanguage('less', require('highlight.js/lib/languages/less.js')); -hljs.registerLanguage('scss', require('highlight.js/lib/languages/scss.js')); -hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml.js')); -hljs.registerLanguage('yml', require('highlight.js/lib/languages/yaml.js')); -hljs.registerLanguage('powershell', require('highlight.js/lib/languages/powershell.js')); -hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript.js')); -hljs.registerLanguage('js', require('highlight.js/lib/languages/javascript.js')); -hljs.registerLanguage('json', require('highlight.js/lib/languages/json.js')); -hljs.registerLanguage('bash', require('highlight.js/lib/languages/shell.js')); -hljs.registerLanguage('php', require('highlight.js/lib/languages/php.js')); -hljs.registerLanguage('shell', require('highlight.js/lib/languages/shell.js')); -hljs.registerLanguage('cmd', require('highlight.js/lib/languages/shell.js')); -hljs.registerLanguage('typescript', require('highlight.js/lib/languages/typescript.js')); -hljs.registerLanguage('ts', require('highlight.js/lib/languages/typescript.js')); -hljs.registerLanguage('python', require('highlight.js/lib/languages/python.js')); -hljs.registerLanguage('py', require('highlight.js/lib/languages/python.js')); - -const markdownRenderer = new marked.Renderer(); -global.gitlist.markdownRenderer = markdownRenderer; - -const kebabCase = require('lodash/kebabCase') -markdownRenderer.heading = function (text, level, raw) { - level = level + 2; - const ref = kebabCase(text).replace(/[^\x00-\xFF]/g, ""); - const id = ref + '-parent'; - const hover = ` onmouseenter="document.getElementById('${ref}').style.display = 'inline'" onmouseleave="document.getElementById('${ref}').style.display = 'none'" `; - - const element = `
${highlighted}
`;
-};
-
-markdownRenderer.codespan = (code) => {
- const lang = 'html';
- const highlighted = hljs.highlight(lang, code).value;
- return `${highlighted}
`;
-}
-window.gitlist.markdownRenderer = markdownRenderer;
-$(function () {
+$(async function () {
const mdContent = $('#p3x-gitlist-readme');
if (mdContent.length) {
+
+ await import(
+ /* webpackChunkName: "marked" */
+ /* webpackPrefetch: true */
+ '../marked'
+ )
+
const twemojiSettings = require('./settings').twemoji;
const html = marked(mdContent.text(), {
- renderer: markdownRenderer
+ renderer: window.gitlist.markdownRenderer
});
mdContent.html(twemoji.parse(html, twemojiSettings));
}
});
-window.gitlist.renderMarkdown = (options) => {
+window.gitlist.renderMarkdown = async(options) => {
+ await import(
+ /* webpackChunkName: "marked" */
+ /* webpackPrefetch: true */
+ '../marked'
+ )
+
const {markdown} = options;
const twemojiSettings = require('./settings').twemoji;
const markedHtml = marked(markdown, {
diff --git a/src/browser/js/network.js b/src/browser/js/network.js
index 53a86d90..26deefcf 100644
--- a/src/browser/js/network.js
+++ b/src/browser/js/network.js
@@ -351,13 +351,19 @@ function commitDataRetriever(startPage, callback) {
return that;
}
-window.gitlist.networkRedraw = () => {
+window.gitlist.networkRedraw = async() => {
// initialise network graph only when there is one network graph container on the page
if ($('div.network-graph').length !== 1) {
return;
}
+ await import(
+ /* webpackChunkName: "raphael" */
+ /* webpackPrefetch: true */
+ '../raphael'
+ );
+
// the element into which we will render our graph
let commitsGraph = $('div.network-graph').first();
diff --git a/src/browser/js/todo.js b/src/browser/js/todo.js
index fbba5234..ee9d7993 100644
--- a/src/browser/js/todo.js
+++ b/src/browser/js/todo.js
@@ -5,7 +5,7 @@ window.gitlist.todo = async () => {
try {
const response = await $.ajax('https://raw.githubusercontent.com/patrikx3/gitlist/master/todo.md')
const $todoModalBody = $('#p3x-gitlist-modal-todo-body')
- todoHtml = window.gitlist.renderMarkdown({
+ todoHtml = await window.gitlist.renderMarkdown({
markdown: response
})
$todoModalBody.html(todoHtml);
diff --git a/src/browser/js/tree.js b/src/browser/js/tree.js
index 907a737e..633499a6 100644
--- a/src/browser/js/tree.js
+++ b/src/browser/js/tree.js
@@ -119,9 +119,9 @@ $(() => {
const $messages = $('.p3x-gitlist-tree-table-item-message')
if ($messages.length > 0) {
- $messages.each((index, element) => {
+ $messages.each(async(index, element) => {
// console.log(element.innerHTML)
- element.innerHTML = window.gitlist.renderMarkdown({
+ element.innerHTML = await window.gitlist.renderMarkdown({
markdown: element.innerHTML.trim()
})
element.innerHTML = $(element).children().html()
diff --git a/src/browser/js/treegraph.js b/src/browser/js/treegraph.js
index 809b8d9d..6206da0f 100644
--- a/src/browser/js/treegraph.js
+++ b/src/browser/js/treegraph.js
@@ -1,8 +1,8 @@
-$(() => {
+$(async() => {
const subjects = $('.p3x-gitlist-treegraph-subject')
if (subjects) {
for (let subject of subjects) {
- const html = window.gitlist.renderMarkdown({
+ const html = await window.gitlist.renderMarkdown({
markdown: subject.innerHTML
})
subject.innerHTML = html
diff --git a/src/browser/marked.js b/src/browser/marked.js
new file mode 100644
index 00000000..955dcd57
--- /dev/null
+++ b/src/browser/marked.js
@@ -0,0 +1,121 @@
+global.twemoji = require('twemoji').default
+const prodDir = require('../../package').corifeus["prod-dir"];
+global.twemoji.base = `${prodDir}/twemoji/`;
+
+global.htmlEncode = require('js-htmlencode')
+const hljs = require('highlight.js');
+hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml.js'));
+hljs.registerLanguage('css', require('highlight.js/lib/languages/css.js'));
+hljs.registerLanguage('cmake', require('highlight.js/lib/languages/cmake.js'));
+hljs.registerLanguage('dockerfile', require('highlight.js/lib/languages/dockerfile.js'));
+hljs.registerLanguage('Dockerfile', require('highlight.js/lib/languages/dockerfile.js'));
+hljs.registerLanguage('less', require('highlight.js/lib/languages/less.js'));
+hljs.registerLanguage('scss', require('highlight.js/lib/languages/scss.js'));
+hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml.js'));
+hljs.registerLanguage('yml', require('highlight.js/lib/languages/yaml.js'));
+hljs.registerLanguage('powershell', require('highlight.js/lib/languages/powershell.js'));
+hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript.js'));
+hljs.registerLanguage('js', require('highlight.js/lib/languages/javascript.js'));
+hljs.registerLanguage('json', require('highlight.js/lib/languages/json.js'));
+hljs.registerLanguage('bash', require('highlight.js/lib/languages/shell.js'));
+hljs.registerLanguage('php', require('highlight.js/lib/languages/php.js'));
+hljs.registerLanguage('shell', require('highlight.js/lib/languages/shell.js'));
+hljs.registerLanguage('cmd', require('highlight.js/lib/languages/shell.js'));
+hljs.registerLanguage('typescript', require('highlight.js/lib/languages/typescript.js'));
+hljs.registerLanguage('ts', require('highlight.js/lib/languages/typescript.js'));
+hljs.registerLanguage('python', require('highlight.js/lib/languages/python.js'));
+hljs.registerLanguage('py', require('highlight.js/lib/languages/python.js'));
+
+global.marked = require('marked')
+
+
+const markdownRenderer = new marked.Renderer();
+global.gitlist.markdownRenderer = markdownRenderer;
+
+const kebabCase = require('lodash/kebabCase')
+markdownRenderer.heading = function (text, level, raw) {
+ level = level + 2;
+ const ref = kebabCase(text).replace(/[^\x00-\xFF]/g, "");
+ const id = ref + '-parent';
+ const hover = ` onmouseenter="document.getElementById('${ref}').style.display = 'inline'" onmouseleave="document.getElementById('${ref}').style.display = 'none'" `;
+
+ const element = `${highlighted}
`;
+};
+
+markdownRenderer.codespan = (code) => {
+ const lang = 'html';
+ const highlighted = hljs.highlight(lang, code).value;
+ return `${highlighted}
`;
+}
+window.gitlist.markdownRenderer = markdownRenderer;
diff --git a/src/browser/raphael.js b/src/browser/raphael.js
new file mode 100644
index 00000000..33d45a23
--- /dev/null
+++ b/src/browser/raphael.js
@@ -0,0 +1,2 @@
+require('eve-raphael/eve.js');
+global.Raphael = require('raphael')
diff --git a/todo.md b/todo.md
index 463edade..06394716 100644
--- a/todo.md
+++ b/todo.md
@@ -43,7 +43,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://
---
-[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.172
+[**P3X-GITLIST**](https://corifeus.com/gitlist) Build v2020.10.182
[![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
diff --git a/webpack.config.js b/webpack.config.js
index 6afa5b3a..f724761c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -45,7 +45,7 @@ const plugins = [
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: !minimize ? '[name].css' : '[name].[contenthash].css',
- chunkFilename: !minimize ? '[id].css' : '[id].[contenthash].css',
+ chunkFilename: !minimize ? '[name].css' : '[name].[contenthash].css',
}),];
/*
@@ -133,12 +133,14 @@ For more information about all licenses, please see ${webpackBanner}
})
)
+ /*
plugins.push(
new webpack.SourceMapDevToolPlugin({
filename: 'sourcemaps/[file].map',
append: '\n//# sourceMappingURL=./[url]'
})
)
+ */
}
@@ -165,7 +167,7 @@ module.exports = {
output: {
path: buildDir,
filename: '[name].[contenthash].js',
- chunkFilename: '[id].[contenthash].chunk.js',
+ chunkFilename: '[name].[contenthash].js',
// publicPath: '{{ app.url_subdir }}/webpack/',
publicPath: `./${prodDir}/webpack/`,
},