This repository has been archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compression options for UglifyJS (#41)
* Handle compression parameters for UglifyJS * Merge defaults into given object
- Loading branch information
Showing
10 changed files
with
94 additions
and
7 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
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
11 changes: 11 additions & 0 deletions
11
test/preload/expected/library_custom_uglify_params/my/ui/lib/library-preload.json
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,11 @@ | ||
{ | ||
"version": "2.0", | ||
"name": "my.ui.lib.library-preload", | ||
"modules": { | ||
"my/ui/lib/library.js": "jQuery.sap.require(\"sap.ui.core.library\"),jQuery.sap.declare(\"my.ui.lib.library\"),sap.ui.getCore().initLibrary({name:\"my.ui.lib\",version:\"0.0.0\",dependencies:[\"sap.ui.core\"]});", | ||
"my/ui/lib/myJS.js": "/* © */\n\"use strict\";function myFunction(longVariableName,longerVariableName){var sample=\"\\u518d\\u6309\\u4e00\\u6b21\\u9000\\u51fa\\u4f19\\u62fc\";return longVariableName+longerVariableName+sample}/**\n* This is a copyright comment\n*/\n/* (c) */\n/* released under */\n/* license */\nconsole.log(\"myJS\");", | ||
"my/ui/lib/my.view.xml": "<my>XML</my>\n", | ||
"my/ui/lib/myHtmlPre.view.xml": "<my>XML</my>\n<!-- A comment in XML is the same as in HTML -->\n<html:pre> </html:pre>", | ||
"my/ui/lib/foo.properties": "FOO=BAR\n" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/preload/fixtures/library-custom-uglify-params/my/ui/lib/foo.properties
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 @@ | ||
FOO=BAR |
8 changes: 8 additions & 0 deletions
8
test/preload/fixtures/library-custom-uglify-params/my/ui/lib/library.js
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,8 @@ | ||
jQuery.sap.require("sap.ui.core.library"); | ||
jQuery.sap.declare("my.ui.lib.library"); | ||
|
||
sap.ui.getCore().initLibrary({ | ||
name : "my.ui.lib", | ||
version: "0.0.0", | ||
dependencies : ["sap.ui.core"] | ||
}); |
2 changes: 2 additions & 0 deletions
2
test/preload/fixtures/library-custom-uglify-params/my/ui/lib/my.view.xml
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,2 @@ | ||
<my>XML</my> | ||
<!-- A comment in XML is the same as in HTML --> |
3 changes: 3 additions & 0 deletions
3
test/preload/fixtures/library-custom-uglify-params/my/ui/lib/myHtmlPre.view.xml
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,3 @@ | ||
<my>XML</my> | ||
<!-- A comment in XML is the same as in HTML --> | ||
<html:pre> </html:pre> |
23 changes: 23 additions & 0 deletions
23
test/preload/fixtures/library-custom-uglify-params/my/ui/lib/myJS.js
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,23 @@ | ||
/* © */ | ||
'use strict'; | ||
|
||
/** | ||
* This is a copyright comment | ||
*/ | ||
|
||
/* (c) */ | ||
|
||
/* released under */ | ||
/* normal comment */ | ||
/* license */ | ||
|
||
|
||
console.log('myJS'); | ||
|
||
/** | ||
* This is a little comment | ||
*/ | ||
function myFunction(longVariableName, longerVariableName) { | ||
var sample = '\u518d\u6309\u4e00\u6b21\u9000\u51fa\u4f19\u62fc'; | ||
return longVariableName + longerVariableName + sample; | ||
} |
3 changes: 3 additions & 0 deletions
3
test/preload/fixtures/library-custom-uglify-params/my/ui/lib/myJSON.json
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,3 @@ | ||
{ | ||
"my": "json" | ||
} |
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