1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 04:10:04 +02:00

update minify

This commit is contained in:
s2
2020-02-07 22:55:28 +01:00
parent 439b2733a6
commit 9dc253a6be
77 changed files with 6154 additions and 24560 deletions

View File

@@ -2079,6 +2079,7 @@ export var domprops = [
"alignmentBaseline",
"alinkColor",
"all",
"allSettled",
"allowFullscreen",
"allowedDirections",
"alpha",
@@ -2122,6 +2123,7 @@ export var domprops = [
"animationTimingFunction",
"animationsPaused",
"anniversary",
"any",
"app",
"appCodeName",
"appMinorVersion",
@@ -2161,12 +2163,15 @@ export var domprops = [
"atob",
"attachEvent",
"attachShader",
"attachShadow",
"attachments",
"attack",
"attrChange",
"attrName",
"attributeFilter",
"attributeName",
"attributeNamespace",
"attributeOldValue",
"attributes",
"audioTracks",
"autoIncrement",
@@ -2379,6 +2384,7 @@ export var domprops = [
"caption",
"caption-side",
"captionSide",
"capture",
"captureEvents",
"captureStackTrace",
"caretPositionFromPoint",
@@ -2407,6 +2413,8 @@ export var domprops = [
"charCode",
"charCodeAt",
"charIndex",
"characterData",
"characterDataOldValue",
"characterSet",
"charging",
"chargingTime",
@@ -2417,6 +2425,7 @@ export var domprops = [
"checkValidity",
"checked",
"childElementCount",
"childList",
"childNodes",
"children",
"chrome",
@@ -2732,9 +2741,9 @@ export var domprops = [
"declare",
"decode",
"decodeAudioData",
"decodingInfo",
"decodeURI",
"decodeURIComponent",
"decodingInfo",
"decrypt",
"default",
"defaultCharset",
@@ -3060,6 +3069,7 @@ export var domprops = [
"formNoValidate",
"formTarget",
"format",
"formatToParts",
"forms",
"forward",
"fr",
@@ -4093,6 +4103,7 @@ export var domprops = [
"oncandidatewindowupdate",
"oncanplay",
"oncanplaythrough",
"once",
"oncellchange",
"onchange",
"onchargingchange",
@@ -4411,6 +4422,7 @@ export var domprops = [
"parseFromString",
"parseInt",
"participants",
"passive",
"password",
"pasteHTML",
"path",
@@ -4500,6 +4512,7 @@ export var domprops = [
"preferredStylesheetSet",
"prefix",
"preload",
"prepend",
"preserveAlpha",
"preserveAspectRatio",
"preserveAspectRatioString",
@@ -4981,8 +4994,8 @@ export var domprops = [
"slice",
"slope",
"small",
"smooth",
"smil",
"smooth",
"smoothingTimeConstant",
"snapToLines",
"snapshotItem",
@@ -5097,6 +5110,7 @@ export var domprops = [
"substring",
"substringData",
"subtle",
"subtree",
"suffix",
"suffixes",
"summary",
@@ -5602,4 +5616,4 @@ export var domprops = [
"zoom",
"zoomAndPan",
"zoomRectScreen"
]
];

31
node_modules/terser/tools/node.js generated vendored
View File

@@ -1,22 +1,19 @@
var fs = require("fs");
import { minify } from "../lib/minify";
var bundle_path = __dirname + "/../dist/bundle.js";
var UglifyJS = require(bundle_path);
module.exports = UglifyJS;
export function default_options() {
const defs = {};
function infer_options(options) {
var result = UglifyJS.minify("", options);
return result.error && result.error.defs;
}
Object.keys(infer_options({ 0: 0 })).forEach((component) => {
const options = infer_options({
[component]: {0: 0}
});
UglifyJS.default_options = function() {
var defs = {};
Object.keys(infer_options({ 0: 0 })).forEach(function(component) {
var options = {};
options[component] = { 0: 0 };
if (options = infer_options(options)) {
defs[component] = options;
}
if (options) defs[component] = options;
});
return defs;
};
}
function infer_options(options) {
var result = minify("", options);
return result.error && result.error.defs;
}

7
node_modules/terser/tools/postinstall.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
if (process.env.CI || process.env.ADBLOCK || process.env.DISABLE_OPENCOLLECTIVE) return;
console.log(
`###########################################################
# contribute to Terser! https://opencollective.com/terser #
###########################################################
`)

View File

@@ -42,13 +42,7 @@
ta.style.width = "100%";
ta.style.height = "20em";
ta.style.boxSizing = "border-box";
<!-- ta.value = Object.keys(props).sort(cmp).map(function(name){ -->
<!-- return JSON.stringify(name); -->
<!-- }).join(",\n"); -->
ta.value = 'var domprops = ' + JSON.stringify({
vars: [],
props: Object.keys(props).sort(cmp)
}, null, 2);
ta.value = 'export var domprops = ' + JSON.stringify(Object.keys(props).sort(cmp), null, 4);
document.body.appendChild(ta);
function cmp(a, b) {

View File

@@ -1,6 +1,11 @@
/// <reference lib="es2015" />
import { RawSourceMap } from 'source-map';
export type ECMA = 5 | 6 | 7 | 8 | 9;
/** @deprecated since this versions basically do not exist */
type ECMA_UNOFFICIAL = 6 | 7 | 8 | 9;
export type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | ECMA_UNOFFICIAL;
export interface ParseOptions {
bare_returns?: boolean;
@@ -12,21 +17,25 @@ export interface ParseOptions {
export interface CompressOptions {
arguments?: boolean;
arrows?: boolean;
booleans_as_integers?: boolean;
booleans?: boolean;
collapse_vars?: boolean;
comparisons?: boolean;
computed_props?: boolean;
conditionals?: boolean;
dead_code?: boolean;
defaults?: boolean;
directives?: boolean;
drop_console?: boolean;
drop_debugger?: boolean;
ecma?: ECMA;
evaluate?: boolean;
expression?: boolean;
global_defs?: object;
hoist_funs?: boolean;
hoist_props?: boolean;
hoist_vars?: boolean;
ie8?: boolean;
if_return?: boolean;
inline?: boolean | InlineFunctions;
join_vars?: boolean;
@@ -35,6 +44,7 @@ export interface CompressOptions {
keep_fnames?: boolean | RegExp;
keep_infinity?: boolean;
loops?: boolean;
module?: boolean;
negate_iife?: boolean;
passes?: number;
properties?: boolean;
@@ -48,8 +58,8 @@ export interface CompressOptions {
toplevel?: boolean;
top_retain?: null | string | string[] | RegExp;
typeofs?: boolean;
unsafe?: boolean;
unsafe_arrows?: boolean;
unsafe?: boolean;
unsafe_comps?: boolean;
unsafe_Function?: boolean;
unsafe_math?: boolean;
@@ -82,8 +92,8 @@ export interface MangleOptions {
export interface ManglePropertiesOptions {
builtins?: boolean;
debug?: boolean;
keep_quoted?: boolean;
regex?: RegExp;
keep_quoted?: boolean | 'strict';
regex?: RegExp | string;
reserved?: string[];
}
@@ -91,15 +101,16 @@ export interface OutputOptions {
ascii_only?: boolean;
beautify?: boolean;
braces?: boolean;
comments?: boolean | 'all' | 'some' | RegExp;
comments?: boolean | 'all' | 'some' | RegExp | Function;
ecma?: ECMA;
indent_level?: number;
indent_start?: boolean;
inline_script?: boolean;
ie8?: boolean;
indent_level?: number;
indent_start?: number;
inline_script?: boolean;
keep_quoted_props?: boolean;
max_line_len?: boolean;
max_line_len?: number | false;
preamble?: string;
preserve_annotations?: boolean;
quote_keys?: boolean;
quote_style?: OutputQuoteStyle;
safari10?: boolean;
@@ -140,7 +151,7 @@ export interface MinifyOutput {
ast?: AST_Node;
code?: string;
error?: Error;
map?: string;
map?: RawSourceMap | string;
warnings?: string[];
}
@@ -179,21 +190,6 @@ export class TreeTransformer extends TreeWalker {
export function push_uniq<T>(array: T[], el: T): void;
type DictEachCallback = (val: any, key: string) => any;
export class Dictionary {
static fromObject(obj: object): Dictionary;
add(key: string, val: any): this;
clone(): Dictionary;
del(key: string): this;
each(fn: DictEachCallback): void;
get(key: string): any;
has(key: string): boolean;
map(fn: DictEachCallback): any[];
set(key: string, val: any): this;
size(): number;
}
export function minify(files: string | string[] | { [file: string]: string } | AST_Node, options?: MinifyOptions): MinifyOutput;
export class AST_Node {
@@ -292,17 +288,14 @@ declare class AST_Accessor extends AST_Lambda {
declare class AST_Function extends AST_Lambda {
constructor(props?: object);
inlined: boolean;
}
declare class AST_Arrow extends AST_Lambda {
constructor(props?: object);
inlined: boolean;
}
declare class AST_Defun extends AST_Lambda {
constructor(props?: object);
inlined: boolean;
}
declare class AST_Class extends AST_Scope {
@@ -310,7 +303,6 @@ declare class AST_Class extends AST_Scope {
name: AST_SymbolClass | AST_SymbolDefClass | null;
extends: AST_Node | null;
properties: AST_ObjectProperty[];
inlined: boolean;
}
declare class AST_DefClass extends AST_Class {
@@ -739,7 +731,10 @@ declare class AST_Number extends AST_Constant {
declare class AST_RegExp extends AST_Constant {
constructor(props?: object);
value: RegExp;
value: {
source: string,
flags: string
};
}
declare class AST_Atom extends AST_Constant {