Add -keep command line option to JS DCE tool
This commit is contained in:
+2
@@ -1,6 +1,8 @@
|
||||
Usage: kotlin-dce-js <options> <source files>
|
||||
where possible options include:
|
||||
-output-dir <path> Output directory
|
||||
-keep <fully.qualified.name[,]>
|
||||
List of fully-qualified names of declarations that shouldn't be eliminated
|
||||
-help (-h) Print a synopsis of standard options
|
||||
-X Print a synopsis of advanced options
|
||||
-version Display compiler version
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
define(["exports"], function(exports) {
|
||||
function foo() {
|
||||
}
|
||||
|
||||
function bar() {
|
||||
}
|
||||
|
||||
function baz() {
|
||||
}
|
||||
|
||||
function ignore() {
|
||||
}
|
||||
|
||||
baz();
|
||||
|
||||
exports.foo = foo;
|
||||
exports.bar = bar;
|
||||
exports.baz = baz;
|
||||
exports.ignore = ignore;
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
$TESTDATA_DIR$/include.js
|
||||
-output-dir
|
||||
$TEMP_DIR$/min
|
||||
-keep
|
||||
global.foo,global.bar
|
||||
-Xprint-reachability-info
|
||||
Reference in New Issue
Block a user