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": {
|
||||
"options": {
|
||||
"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": {
|
||||
"keep_classnames": true,
|
||||
"keep_fnames": false
|
||||
"keep_fnames": false,
|
||||
"reserved": ["noChange", "nothing"]
|
||||
},
|
||||
"output": {
|
||||
"ecma": 6
|
||||
|
|
@ -126,7 +150,8 @@
|
|||
"options": {
|
||||
"compress": false,
|
||||
"yuicompress": false,
|
||||
"optimization": 0
|
||||
"optimization": 0,
|
||||
"strictMath": false
|
||||
},
|
||||
"files": {
|
||||
"<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
|
||||
|
|
@ -138,7 +163,8 @@
|
|||
"options": {
|
||||
"compress": true,
|
||||
"yuicompress": true,
|
||||
"optimization": 2
|
||||
"optimization": 2,
|
||||
"strictMath": false
|
||||
},
|
||||
"files": {
|
||||
"<%= 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",
|
||||
"exports-loader": "^0.6.4",
|
||||
"favico.js": "^0.3.10",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt": "^1.6.1",
|
||||
"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-jshint": "^0.12.0",
|
||||
"grunt-contrib-less": "^1.1.0",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-terser": "^1.0.0",
|
||||
"grunt-webpack": "^3.1.3",
|
||||
"grunt-contrib-jshint": "^3.2.0",
|
||||
"grunt-contrib-less": "^3.0.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-terser": "^2.0.0",
|
||||
"grunt-webpack": "^4.0.3",
|
||||
"html-loader": "^0.4.4",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"imports-loader": "^0.7.1",
|
||||
|
|
@ -49,15 +49,14 @@
|
|||
"luxon": "^3.7.2",
|
||||
"mark.js": "8.11.1",
|
||||
"mousetrap": "^1.6.1",
|
||||
"polymer-webpack-loader": "^2.0.1",
|
||||
"raw-loader": "1.0.0-beta.0",
|
||||
"sticky-sidebar": "3.3.1",
|
||||
"style-loader": "^0.21.0",
|
||||
"sweetalert2": "^9.10.12",
|
||||
"ts-loader": "^1.3.3",
|
||||
"waypoints": "4.0.1",
|
||||
"webpack": "4.23.1",
|
||||
"webpack-cli": "3.1.2"
|
||||
"webpack": "4.46.0",
|
||||
"webpack-cli": "3.3.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"lit": "^2.8.0",
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ controllers
|
|||
import logging
|
||||
import socket
|
||||
import base64
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
import markupsafe
|
||||
import ipaddress
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
import 'regenerator-runtime/runtime.js';
|
||||
import '@polymer/iron-ajax/iron-ajax.js';
|
||||
import './shared-styles.js';
|
||||
import './channelstream-connection/channelstream-connection.js';
|
||||
import './rhodecode-toast/rhodecode-toast.js';
|
||||
import './rhodecode-unsafe-html/rhodecode-unsafe-html.js';
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ export class RhodecodeToast extends LitElement {
|
|||
}
|
||||
|
||||
handleNotification(data) {
|
||||
console.log('[RhodecodeToast] handleNotification called - DEBUG BUILD v2', data);
|
||||
if (!templateContext.rhodecode_user.notification_status && !data.message.force) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -231,6 +232,7 @@ export class RhodecodeToast extends LitElement {
|
|||
level: data.message.level,
|
||||
message: data.message.message
|
||||
}];
|
||||
console.log('[RhodecodeToast] toasts updated, count:', this.toasts.length);
|
||||
}
|
||||
|
||||
_gettext(x) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {LitElement, html} from 'lit';
|
||||
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
|
||||
|
||||
export class RhodecodeUnsafeHtml extends LitElement {
|
||||
static properties = {
|
||||
|
|
@ -11,13 +12,8 @@ export class RhodecodeUnsafeHtml extends LitElement {
|
|||
}
|
||||
|
||||
render() {
|
||||
return html`<slot></slot>`;
|
||||
}
|
||||
|
||||
updated(changedProperties) {
|
||||
if (changedProperties.has('text')) {
|
||||
this.innerHTML = this.text;
|
||||
}
|
||||
console.log('[RhodecodeUnsafeHtml] render() called, text:', this.text);
|
||||
return html`${unsafeHTML(this.text)}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ module.exports = {
|
|||
path: path.resolve(destinationDirectory)
|
||||
},
|
||||
// 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
|
||||
// the property we’ll need to tell it to look there.
|
||||
// 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.
|
||||
resolve: {
|
||||
modules: [
|
||||
path.resolve(__dirname, 'node_modules'),
|
||||
|
|
@ -57,31 +57,11 @@ module.exports = {
|
|||
use: 'raw-loader'
|
||||
},
|
||||
{
|
||||
// If you see a file that ends in .html, send it to these loaders.
|
||||
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.
|
||||
// Babel-loader for JS files
|
||||
test: /\.js$/,
|
||||
// Exclude node_modules, but process our Lit components
|
||||
// Babel is configured to NOT transpile ES6 classes (see babelRCOptions exclude)
|
||||
exclude: /node_modules/,
|
||||
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/,
|
||||
use: 'imports-loader?this=>window'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue