Bumped webpack and grunt, fixed notifications issue caused by minification
This commit is contained in:
parent
933eb5bb2f
commit
1791f83dcc
8 changed files with 3577 additions and 12995 deletions
|
|
@ -106,11 +106,35 @@
|
||||||
"dist": {
|
"dist": {
|
||||||
"options": {
|
"options": {
|
||||||
"compress": {
|
"compress": {
|
||||||
"ecma": 6
|
"ecma": 6,
|
||||||
|
"arrows": false,
|
||||||
|
"collapse_vars": false,
|
||||||
|
"comparisons": false,
|
||||||
|
"computed_props": false,
|
||||||
|
"hoist_funs": false,
|
||||||
|
"hoist_props": false,
|
||||||
|
"hoist_vars": false,
|
||||||
|
"inline": false,
|
||||||
|
"loops": false,
|
||||||
|
"negate_iife": false,
|
||||||
|
"properties": false,
|
||||||
|
"reduce_funcs": false,
|
||||||
|
"reduce_vars": false,
|
||||||
|
"switches": false,
|
||||||
|
"toplevel": false,
|
||||||
|
"typeofs": false,
|
||||||
|
"booleans": true,
|
||||||
|
"if_return": true,
|
||||||
|
"sequences": true,
|
||||||
|
"unused": true,
|
||||||
|
"conditionals": true,
|
||||||
|
"dead_code": true,
|
||||||
|
"evaluate": true
|
||||||
},
|
},
|
||||||
"mangle": {
|
"mangle": {
|
||||||
"keep_classnames": true,
|
"keep_classnames": true,
|
||||||
"keep_fnames": false
|
"keep_fnames": false,
|
||||||
|
"reserved": ["noChange", "nothing"]
|
||||||
},
|
},
|
||||||
"output": {
|
"output": {
|
||||||
"ecma": 6
|
"ecma": 6
|
||||||
|
|
@ -126,7 +150,8 @@
|
||||||
"options": {
|
"options": {
|
||||||
"compress": false,
|
"compress": false,
|
||||||
"yuicompress": false,
|
"yuicompress": false,
|
||||||
"optimization": 0
|
"optimization": 0,
|
||||||
|
"strictMath": false
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
|
"<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
|
||||||
|
|
@ -138,7 +163,8 @@
|
||||||
"options": {
|
"options": {
|
||||||
"compress": true,
|
"compress": true,
|
||||||
"yuicompress": true,
|
"yuicompress": true,
|
||||||
"optimization": 2
|
"optimization": 2,
|
||||||
|
"strictMath": false
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
|
"<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
|
||||||
|
|
|
||||||
16477
package-lock.json
generated
16477
package-lock.json
generated
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
|
@ -31,15 +31,15 @@
|
||||||
"dropzone": "^5.5.0",
|
"dropzone": "^5.5.0",
|
||||||
"exports-loader": "^0.6.4",
|
"exports-loader": "^0.6.4",
|
||||||
"favico.js": "^0.3.10",
|
"favico.js": "^0.3.10",
|
||||||
"grunt": "^0.4.5",
|
"grunt": "^1.6.1",
|
||||||
"grunt-cli": "^1.4.3",
|
"grunt-cli": "^1.4.3",
|
||||||
"grunt-contrib-concat": "^0.5.1",
|
"grunt-contrib-concat": "^2.1.0",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
"grunt-contrib-jshint": "^0.12.0",
|
"grunt-contrib-jshint": "^3.2.0",
|
||||||
"grunt-contrib-less": "^1.1.0",
|
"grunt-contrib-less": "^3.0.0",
|
||||||
"grunt-contrib-watch": "^0.6.1",
|
"grunt-contrib-watch": "^1.1.0",
|
||||||
"grunt-terser": "^1.0.0",
|
"grunt-terser": "^2.0.0",
|
||||||
"grunt-webpack": "^3.1.3",
|
"grunt-webpack": "^4.0.3",
|
||||||
"html-loader": "^0.4.4",
|
"html-loader": "^0.4.4",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"imports-loader": "^0.7.1",
|
"imports-loader": "^0.7.1",
|
||||||
|
|
@ -49,15 +49,14 @@
|
||||||
"luxon": "^3.7.2",
|
"luxon": "^3.7.2",
|
||||||
"mark.js": "8.11.1",
|
"mark.js": "8.11.1",
|
||||||
"mousetrap": "^1.6.1",
|
"mousetrap": "^1.6.1",
|
||||||
"polymer-webpack-loader": "^2.0.1",
|
|
||||||
"raw-loader": "1.0.0-beta.0",
|
"raw-loader": "1.0.0-beta.0",
|
||||||
"sticky-sidebar": "3.3.1",
|
"sticky-sidebar": "3.3.1",
|
||||||
"style-loader": "^0.21.0",
|
"style-loader": "^0.21.0",
|
||||||
"sweetalert2": "^9.10.12",
|
"sweetalert2": "^9.10.12",
|
||||||
"ts-loader": "^1.3.3",
|
"ts-loader": "^1.3.3",
|
||||||
"waypoints": "4.0.1",
|
"waypoints": "4.0.1",
|
||||||
"webpack": "4.23.1",
|
"webpack": "4.46.0",
|
||||||
"webpack-cli": "3.1.2"
|
"webpack-cli": "3.3.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lit": "^2.8.0",
|
"lit": "^2.8.0",
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ controllers
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
import base64
|
import base64
|
||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
|
||||||
import markupsafe
|
import markupsafe
|
||||||
import ipaddress
|
import ipaddress
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import 'regenerator-runtime/runtime.js';
|
import 'regenerator-runtime/runtime.js';
|
||||||
import '@polymer/iron-ajax/iron-ajax.js';
|
|
||||||
import './shared-styles.js';
|
|
||||||
import './channelstream-connection/channelstream-connection.js';
|
import './channelstream-connection/channelstream-connection.js';
|
||||||
import './rhodecode-toast/rhodecode-toast.js';
|
import './rhodecode-toast/rhodecode-toast.js';
|
||||||
import './rhodecode-unsafe-html/rhodecode-unsafe-html.js';
|
import './rhodecode-unsafe-html/rhodecode-unsafe-html.js';
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ export class RhodecodeToast extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleNotification(data) {
|
handleNotification(data) {
|
||||||
|
console.log('[RhodecodeToast] handleNotification called - DEBUG BUILD v2', data);
|
||||||
if (!templateContext.rhodecode_user.notification_status && !data.message.force) {
|
if (!templateContext.rhodecode_user.notification_status && !data.message.force) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -231,6 +232,7 @@ export class RhodecodeToast extends LitElement {
|
||||||
level: data.message.level,
|
level: data.message.level,
|
||||||
message: data.message.message
|
message: data.message.message
|
||||||
}];
|
}];
|
||||||
|
console.log('[RhodecodeToast] toasts updated, count:', this.toasts.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
_gettext(x) {
|
_gettext(x) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import {LitElement, html} from 'lit';
|
import {LitElement, html} from 'lit';
|
||||||
|
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
|
||||||
|
|
||||||
export class RhodecodeUnsafeHtml extends LitElement {
|
export class RhodecodeUnsafeHtml extends LitElement {
|
||||||
static properties = {
|
static properties = {
|
||||||
|
|
@ -11,13 +12,8 @@ export class RhodecodeUnsafeHtml extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`<slot></slot>`;
|
console.log('[RhodecodeUnsafeHtml] render() called, text:', this.text);
|
||||||
}
|
return html`${unsafeHTML(this.text)}`;
|
||||||
|
|
||||||
updated(changedProperties) {
|
|
||||||
if (changedProperties.has('text')) {
|
|
||||||
this.innerHTML = this.text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ module.exports = {
|
||||||
path: path.resolve(destinationDirectory)
|
path: path.resolve(destinationDirectory)
|
||||||
},
|
},
|
||||||
// Tell Webpack which directories to look in to resolve import statements.
|
// Tell Webpack which directories to look in to resolve import statements.
|
||||||
// Normally Webpack will look in node_modules by default but since we’re overriding
|
// Normally Webpack will look in node_modules by default but since we're overriding
|
||||||
// the property we’ll need to tell it to look there.
|
// the property we'll need to tell it to look there.
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: [
|
modules: [
|
||||||
path.resolve(__dirname, 'node_modules'),
|
path.resolve(__dirname, 'node_modules'),
|
||||||
|
|
@ -57,31 +57,11 @@ module.exports = {
|
||||||
use: 'raw-loader'
|
use: 'raw-loader'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// If you see a file that ends in .html, send it to these loaders.
|
// Babel-loader for JS files
|
||||||
test: /\.html$/,
|
|
||||||
// This is an example of chained loaders in Webpack.
|
|
||||||
// Chained loaders run last to first. So it will run
|
|
||||||
// polymer-webpack-loader, and hand the output to
|
|
||||||
// babel-loader. This let's us transpile JS in our `<script>` elements.
|
|
||||||
use: [
|
|
||||||
{loader: 'babel-loader', options: babelRCOptions},
|
|
||||||
{loader: 'polymer-webpack-loader',
|
|
||||||
options: {
|
|
||||||
processStyleLinks: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// If you see a file that ends in .js, just send it to the babel-loader.
|
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
// Exclude node_modules, but process our Lit components
|
|
||||||
// Babel is configured to NOT transpile ES6 classes (see babelRCOptions exclude)
|
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: {loader: 'babel-loader', options: babelRCOptions}
|
use: {loader: 'babel-loader', options: babelRCOptions}
|
||||||
},
|
},
|
||||||
// this is required because of bug:
|
|
||||||
// https://github.com/webpack-contrib/polymer-webpack-loader/issues/49
|
|
||||||
{
|
{
|
||||||
test: /intl-messageformat.min.js/,
|
test: /intl-messageformat.min.js/,
|
||||||
use: 'imports-loader?this=>window'
|
use: 'imports-loader?this=>window'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue