Command-line tool for JS DCE
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
-help
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
Usage: kotlin-dce-js <options> <source files>
|
||||
where possible options include:
|
||||
-output-dir <path> Output directory
|
||||
-help (-h) Print a synopsis of standard options
|
||||
-X Print a synopsis of advanced options
|
||||
-version Display compiler version
|
||||
-verbose Enable verbose logging output
|
||||
-nowarn Generate no warnings
|
||||
OK
|
||||
@@ -0,0 +1,2 @@
|
||||
-output-dir
|
||||
$TESTDATA_DIR$/min
|
||||
@@ -0,0 +1,2 @@
|
||||
error: no source files
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,8 @@
|
||||
info:
|
||||
info: <unknown>
|
||||
info: global
|
||||
info: bar (reachable)
|
||||
info: foo (reachable)
|
||||
info: include
|
||||
info: baz (reachable from include.js:14)
|
||||
OK
|
||||
@@ -0,0 +1 @@
|
||||
-X
|
||||
@@ -0,0 +1,6 @@
|
||||
Usage: kotlin-dce-js <options> <source files>
|
||||
where advanced options include:
|
||||
-Xprint-reachability-info Print declarations marked as reachable
|
||||
|
||||
Advanced options are non-standard and may be changed or removed without any notice.
|
||||
OK
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
function bar() {
|
||||
return 'bar';
|
||||
}
|
||||
console.log(bar());
|
||||
@@ -0,0 +1,3 @@
|
||||
nonExistingSourceFile.js
|
||||
-output-dir
|
||||
$TEMP_DIR/min
|
||||
@@ -0,0 +1,2 @@
|
||||
error: source file or directory not found: nonExistingSourceFile.js
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1 @@
|
||||
// ABSENT: min/nonExistingSourceFile.js
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
$TESTDATA_DIR$
|
||||
-output-dir
|
||||
$TEMP_DIR/min
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
error: input file 'compiler/testData/cli/js-dce' is a directory
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,3 @@
|
||||
$TESTDATA_DIR$/simple.js
|
||||
-output-dir
|
||||
$TESTDATA_DIR$/min
|
||||
@@ -0,0 +1,2 @@
|
||||
error: cannot open output file '$TESTDATA_DIR$/min/simple.js': is a directory
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1 @@
|
||||
// ABSENT: out.js
|
||||
@@ -0,0 +1,3 @@
|
||||
$TESTDATA_DIR$/simple.js:bar
|
||||
-output-dir
|
||||
$TEMP_DIR$/min
|
||||
@@ -0,0 +1 @@
|
||||
OK
|
||||
@@ -0,0 +1 @@
|
||||
// EXISTS: min/bar.js
|
||||
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/simple.js
|
||||
-output-dir
|
||||
$TEMP_DIR$/min
|
||||
-Xprint-reachability-info
|
||||
@@ -0,0 +1,6 @@
|
||||
info:
|
||||
info: <unknown>
|
||||
info: bar (reachable from simple.js:7)
|
||||
info: console
|
||||
info: log (reachable from simple.js:7)
|
||||
OK
|
||||
@@ -0,0 +1 @@
|
||||
// EXISTS: min/simple.js
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
$TESTDATA_DIR$/simple.js
|
||||
-output-dir
|
||||
$TEMP_DIR$/min
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
function foo() {
|
||||
return "foo";
|
||||
}
|
||||
function bar() {
|
||||
return "bar";
|
||||
}
|
||||
console.log(bar());
|
||||
+1
@@ -0,0 +1 @@
|
||||
OK
|
||||
+1
@@ -0,0 +1 @@
|
||||
// EXISTS: min/simple.js
|
||||
Vendored
+5
-5
@@ -13,11 +13,11 @@ where possible options include:
|
||||
-output-postfix <path> Path to file which will be added to the end of output file
|
||||
-language-version <version> Provide source compatibility with specified language version
|
||||
-api-version <version> Allow to use declarations only from the specified version of bundled libraries
|
||||
-nowarn Generate no warnings
|
||||
-verbose Enable verbose logging output
|
||||
-version Display compiler version
|
||||
-help (-h) Print a synopsis of standard options
|
||||
-X Print a synopsis of advanced options
|
||||
-P plugin:<pluginId>:<optionName>=<value>
|
||||
Pass an option to a plugin
|
||||
-help (-h) Print a synopsis of standard options
|
||||
-X Print a synopsis of advanced options
|
||||
-version Display compiler version
|
||||
-verbose Enable verbose logging output
|
||||
-nowarn Generate no warnings
|
||||
OK
|
||||
Vendored
+5
-5
@@ -17,11 +17,11 @@ where possible options include:
|
||||
-java-parameters Generate metadata for Java 1.8 reflection on method parameters
|
||||
-language-version <version> Provide source compatibility with specified language version
|
||||
-api-version <version> Allow to use declarations only from the specified version of bundled libraries
|
||||
-nowarn Generate no warnings
|
||||
-verbose Enable verbose logging output
|
||||
-version Display compiler version
|
||||
-help (-h) Print a synopsis of standard options
|
||||
-X Print a synopsis of advanced options
|
||||
-P plugin:<pluginId>:<optionName>=<value>
|
||||
Pass an option to a plugin
|
||||
-help (-h) Print a synopsis of standard options
|
||||
-X Print a synopsis of advanced options
|
||||
-version Display compiler version
|
||||
-verbose Enable verbose logging output
|
||||
-nowarn Generate no warnings
|
||||
OK
|
||||
Reference in New Issue
Block a user