-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
213 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.19 | ||
0.0.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
declare const terserConfig: { | ||
parse: {}; | ||
compress: { | ||
drop_console: boolean; | ||
drop_debugger: boolean; | ||
pure_funcs: string[]; | ||
arrows: boolean; | ||
}; | ||
mangle: { | ||
properties: { | ||
bare_returns: boolean; | ||
html5_comments: boolean; | ||
shebang: boolean; | ||
spidermonkey: boolean; | ||
}; | ||
}; | ||
format: { | ||
comments: boolean; | ||
beautify: boolean; | ||
}; | ||
sourceMap: {}; | ||
ecma: number; | ||
enclose: boolean; | ||
keep_classnames: boolean; | ||
keep_fnames: boolean; | ||
ie8: boolean; | ||
module: boolean; | ||
nameCache: null; | ||
safari10: boolean; | ||
toplevel: boolean; | ||
}; | ||
export default terserConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
"use strict"; | ||
// config/terser.config.ts | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// Copyright 2023 Scape Agency BV | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ============================================================================ | ||
// Import | ||
// ============================================================================ | ||
// ============================================================================ | ||
// Constants | ||
// ============================================================================ | ||
// https://terser.org/docs/api-reference/ | ||
const terserConfig = { | ||
parse: { | ||
// parse options | ||
}, | ||
compress: { | ||
// compress options | ||
drop_console: true, // Remove console.log statements | ||
drop_debugger: true, // Remove debugger statements | ||
pure_funcs: ['console.info', 'console.debug', 'console.warn'], // Remove specific console functions | ||
// defaults (default: true) -- Pass false to disable most default enabled compress transforms. Useful when you only want to enable a few compress options while disabling the rest. | ||
// Class and object literal methods are converted will also be | ||
// converted to arrow expressions if the resultant code is shorter: | ||
// m(){return x} becomes m:()=>x. To do this to regular ES5 functions | ||
// which don't use this or arguments, see unsafe_arrows. | ||
arrows: true | ||
}, | ||
mangle: { | ||
// mangle options | ||
// Mangle names for obfuscation and size reduction | ||
// properties: true, // Mangle property names | ||
properties: { | ||
// mangle property options | ||
bare_returns: false, //support top level return statements | ||
html5_comments: true, // (default true) | ||
shebang: true, //(default true) -- support #!command as the first line | ||
spidermonkey: false | ||
} | ||
}, | ||
format: { | ||
// format options (can also use `output` for backwards compatibility) | ||
comments: false, // Remove comments to reduce file size | ||
beautify: false | ||
}, | ||
sourceMap: { | ||
// source map options | ||
}, | ||
// Define ECMAScript target version | ||
ecma: 5, // specify one of: 5, 2015, 2016, etc. | ||
enclose: false, // or specify true, or "args:values" | ||
keep_classnames: false, // Remove class names | ||
keep_fnames: false, // Remove function names | ||
ie8: false, | ||
module: false, | ||
nameCache: null, // or specify a name cache object | ||
safari10: false, | ||
toplevel: true | ||
}; | ||
// ============================================================================ | ||
// Export | ||
// ============================================================================ | ||
exports.default = terserConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.