├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── .gitmodules ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── appveyor.yml ├── changelog.md ├── doc └── readme.md ├── images └── nuglify.png ├── license.txt ├── readme.md └── src ├── NUglify.Benchmarks ├── App.config ├── BenchMinifier.cs ├── BenchParser.cs ├── NUglify.Benchmarks.csproj ├── Program.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── NUglify.Tasks ├── GlobalSuppressions.cs ├── ManifestStrings.Designer.cs ├── ManifestStrings.resx ├── NUglify.Tasks.csproj ├── NUglify.targets ├── NUglify.tasks ├── NUglifyBuildTask.cs ├── NUglifyBundleTask.cs ├── NUglifyManifestBaseTask.cs ├── NUglifyManifestCleanTask.cs ├── NUglifyManifestTask.cs ├── NUglifyTask.targets ├── Properties │ └── AssemblyInfo.cs ├── Strings.Designer.cs ├── Strings.resx ├── install.ps1 └── uninstall.ps1 ├── NUglify.Tests ├── App.config ├── Core │ ├── ArrowConcise.cs │ ├── ArrowExplicitReturn.cs │ ├── CommandLine.cs │ ├── CssEncoding.cs │ ├── DebugBlock.cs │ ├── DllUnitTest.csproj │ ├── ErrorStrings.cs │ ├── Frameworks.cs │ ├── JSEncoding.cs │ ├── JSONValidate.cs │ ├── LogicalNot.cs │ ├── ManifestTask.cs │ ├── MinifiedNames.cs │ ├── NUglifyTask.cs │ ├── Preprocessor.cs │ ├── ReplacementTokens.cs │ ├── SourceDirective.cs │ ├── SymbolsMapTests.cs │ └── TestBuildEngine.cs ├── Css │ ├── AtRules.cs │ ├── Bugs.cs │ ├── Collapse.cs │ ├── CommentHacks.cs │ ├── Common │ │ └── TestHelper.cs │ ├── Declarations.cs │ ├── EmbeddedAspNetBlock.cs │ ├── Encoding.cs │ ├── Errors.cs │ ├── Hacks.cs │ ├── Replacements.cs │ ├── Selectors.cs │ ├── Switches.cs │ ├── Syntax.cs │ └── Values.cs ├── Html │ ├── Bugs.cs │ ├── TestAttributes.cs │ ├── TestCaseAndSpaceNormalization.cs │ ├── TestCollapseWhiteSpaces.cs │ ├── TestComments.cs │ ├── TestEntities.cs │ ├── TestHelper.cs │ ├── TestHtmlParser.cs │ ├── TestHtmlParserBase.cs │ ├── TestInvalidHtml.cs │ ├── TestOptionalTags.cs │ ├── TestParsingNonTrivialMarkup.cs │ ├── TestSafeHtml.cs │ ├── TestScripts.cs │ ├── TestStandard.cs │ ├── TestStyles.cs │ └── TestSvg.cs ├── JavaScript │ ├── ArrayHandling.cs │ ├── AspNet.cs │ ├── Assignments.cs │ ├── AstMods.cs │ ├── BlockOpts.cs │ ├── Booleans.cs │ ├── Bugs.cs │ ├── CatchVariable.cs │ ├── Classes.cs │ ├── CommandLine.cs │ ├── Comments.cs │ ├── Common │ │ └── TestHelper.cs │ ├── Comprehensions.cs │ ├── ConditionalCompilation.cs │ ├── ControlFlow.cs │ ├── DebugNamespaces.cs │ ├── Declarations.cs │ ├── ES2015.cs │ ├── ES2016.cs │ ├── ES2017.cs │ ├── ES2018.cs │ ├── ES2019.cs │ ├── ES2020.cs │ ├── ES2021.cs │ ├── Encodings.cs │ ├── FunctionCreation.cs │ ├── GlobalMethods.cs │ ├── JsPopular.cs │ ├── LexicalDeclarations.cs │ ├── Literals.cs │ ├── Modules.cs │ ├── NoMinify.cs │ ├── ObjectCreation.cs │ ├── Operators.cs │ ├── Preprocessor.cs │ ├── Renaming.cs │ ├── ResourceMerge.cs │ ├── ScannerErrors.cs │ ├── SourceMap.cs │ ├── StdIn.cs │ ├── Strict.cs │ ├── Switch.cs │ ├── Syntax.cs │ ├── TC39.cs │ ├── UnknownScope.cs │ ├── VarDecls.cs │ └── XMLInput.cs ├── NUglify.Tests.csproj ├── NUglify.Tests.csproj.DotSettings ├── NUglify.Tests.nuget.props ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── TestData │ ├── CSS │ │ ├── Expected │ │ │ ├── AtRules │ │ │ │ ├── Charset.css │ │ │ │ ├── FontFace.css │ │ │ │ ├── Import.css │ │ │ │ ├── ImportColor_i.css │ │ │ │ ├── ImportComment.css │ │ │ │ ├── ImportComment_c.css │ │ │ │ ├── ImportComment_x.css │ │ │ │ ├── ImportLevel0Bar2_i.css │ │ │ │ ├── ImportLevel1Bar_i.css │ │ │ │ ├── ImportLevel1Baz_i.css │ │ │ │ ├── ImportLevel2Foo_i.css │ │ │ │ ├── ImportLevel3Foo2_i.css │ │ │ │ ├── KeyFrames.css │ │ │ │ ├── KeyFrames_p.css │ │ │ │ ├── KeyFrames_same.css │ │ │ │ ├── Keyframes_source.css │ │ │ │ ├── Media.css │ │ │ │ ├── Namespace.css │ │ │ │ ├── Other.css │ │ │ │ ├── Page.css │ │ │ │ ├── RazorEscapedDoubleAt.css │ │ │ │ └── Supports.css │ │ │ ├── Bugs │ │ │ │ ├── Bug250.css │ │ │ │ ├── Bug270.css │ │ │ │ ├── Bug33.css │ │ │ │ ├── Bug331.css │ │ │ │ ├── Bug412.css │ │ │ │ ├── Bug56.css │ │ │ │ └── Bug74.css │ │ │ ├── Collapse │ │ │ │ ├── Numbers.css │ │ │ │ ├── Numbers_n.css │ │ │ │ ├── RGB.css │ │ │ │ ├── RGB_f.css │ │ │ │ ├── RGB_h.css │ │ │ │ ├── StringBreaks.css │ │ │ │ ├── TermSemis.css │ │ │ │ ├── TermSemis_t.css │ │ │ │ ├── rgba.css │ │ │ │ ├── rrggbb.css │ │ │ │ └── rrggbbaa.css │ │ │ ├── CommentHacks │ │ │ │ ├── EmbeddedImportantComment.css │ │ │ │ ├── EmbeddedImportantComment_pretty.css │ │ │ │ ├── EmptyComments.css │ │ │ │ ├── EmptyComments_nc.css │ │ │ │ ├── HideFromIE5.css │ │ │ │ ├── HideFromIE5_nc.css │ │ │ │ ├── HideFromIE6.css │ │ │ │ ├── HideFromIE6_nc.css │ │ │ │ ├── HideFromMacIE.css │ │ │ │ ├── HideFromMacIE_nc.css │ │ │ │ ├── HideFromNS4.css │ │ │ │ ├── HideFromNS4_nc.css │ │ │ │ ├── ImportantComment.css │ │ │ │ ├── ImportantCommentHacks.css │ │ │ │ ├── ImportantComment_All.css │ │ │ │ ├── ImportantComment_Kill.css │ │ │ │ ├── ImportantComment_None.css │ │ │ │ ├── OnlyNS4.css │ │ │ │ ├── OnlyNS4_nc.css │ │ │ │ ├── SharepointThemes.css │ │ │ │ ├── SharepointThemes_None.css │ │ │ │ ├── SingleLine.css │ │ │ │ ├── TwoImportantComments.css │ │ │ │ └── TwoImportantComments_pretty.css │ │ │ ├── Declarations │ │ │ │ ├── NoTrailingSemicolon.css │ │ │ │ ├── NoTrailingSemicolon_term.css │ │ │ │ ├── TrailingSemicolon.css │ │ │ │ └── TrailingSemicolon_term.css │ │ │ ├── EmbeddedAspNetBlock │ │ │ │ ├── StringWithBlock.css │ │ │ │ └── TopLevel.css │ │ │ ├── Encoding │ │ │ │ ├── empty.css │ │ │ │ ├── escaped.css │ │ │ │ └── escaped_utf8.css │ │ │ ├── Errors │ │ │ │ ├── BadRGB.css │ │ │ │ ├── Exponent.css │ │ │ │ ├── InvalidClassName.css │ │ │ │ ├── ParsingErrors.css │ │ │ │ └── UnterminatedString.css │ │ │ ├── Hacks │ │ │ │ └── IEhacks.css │ │ │ ├── Replacements │ │ │ │ ├── ColorNames_hex.css │ │ │ │ ├── ColorNames_major.css │ │ │ │ ├── ColorNames_noswap.css │ │ │ │ ├── ColorNames_strict.css │ │ │ │ ├── CssReplacementTokens.css │ │ │ │ ├── Ie8Eot.css │ │ │ │ ├── MajorColors.css │ │ │ │ ├── MajorColors_strict.css │ │ │ │ ├── StringReplacement.css │ │ │ │ └── ValueReplacement.css │ │ │ ├── Selectors │ │ │ │ ├── Any.css │ │ │ │ ├── Attribute.css │ │ │ │ ├── Bootstrap4CssVariables.css │ │ │ │ ├── CSS3.css │ │ │ │ ├── CSS3_all.css │ │ │ │ ├── CSS3_pretty.css │ │ │ │ ├── Combinator.css │ │ │ │ ├── Escapes.css │ │ │ │ ├── Grouping.css │ │ │ │ ├── MatchCasing.css │ │ │ │ ├── Namespace.css │ │ │ │ ├── NoSpaceUniversal.css │ │ │ │ ├── Not.css │ │ │ │ ├── PseudoClass.css │ │ │ │ ├── PseudoClass_utf8.css │ │ │ │ ├── PseudoElement.css │ │ │ │ ├── PseudoFunctions.css │ │ │ │ ├── Simple.css │ │ │ │ └── Universal.css │ │ │ ├── Switches │ │ │ │ └── EchoInput.css │ │ │ ├── Syntax │ │ │ │ ├── AlphaHash.css │ │ │ │ ├── CDO.css │ │ │ │ ├── Escapes.css │ │ │ │ ├── Expr.css │ │ │ │ ├── Expression.css │ │ │ │ ├── FontNames.css │ │ │ │ ├── Function.css │ │ │ │ ├── Function_f.css │ │ │ │ ├── Important.css │ │ │ │ ├── PointZeroEms.css │ │ │ │ ├── RgbWithFunc.css │ │ │ │ ├── RgbWithSpace.css │ │ │ │ ├── Strings.css │ │ │ │ ├── Term.css │ │ │ │ ├── UnicodeRange.css │ │ │ │ └── uri.css │ │ │ └── Values │ │ │ │ ├── Attr.css │ │ │ │ ├── Calc.css │ │ │ │ ├── Cycle.css │ │ │ │ ├── Grids.css │ │ │ │ ├── Toggle.css │ │ │ │ ├── Units.css │ │ │ │ ├── Zeros.css │ │ │ │ └── progid.css │ │ └── Input │ │ │ ├── AtRules │ │ │ ├── Charset.css │ │ │ ├── FontFace.css │ │ │ ├── Import.css │ │ │ ├── ImportColor.css │ │ │ ├── ImportComment.css │ │ │ ├── ImportLevel0Bar2.css │ │ │ ├── ImportLevel1Bar.css │ │ │ ├── ImportLevel1Baz.css │ │ │ ├── ImportLevel2Foo.css │ │ │ ├── ImportLevel3Foo2.css │ │ │ ├── KeyFrames.css │ │ │ ├── Media.css │ │ │ ├── Namespace.css │ │ │ ├── Other.css │ │ │ ├── Page.css │ │ │ ├── RazorEscapedDoubleAt.css │ │ │ ├── Supports.css │ │ │ ├── green.css │ │ │ └── red.css │ │ │ ├── Bugs │ │ │ ├── Bug250.css │ │ │ ├── Bug270.css │ │ │ ├── Bug33.css │ │ │ ├── Bug331.css │ │ │ ├── Bug412.css │ │ │ ├── Bug56.css │ │ │ └── Bug74.css │ │ │ ├── Collapse │ │ │ ├── Numbers.css │ │ │ ├── RGB.css │ │ │ ├── StringBreaks.css │ │ │ ├── TermSemis.css │ │ │ ├── rgba.css │ │ │ ├── rrggbb.css │ │ │ └── rrggbbaa.css │ │ │ ├── CommentHacks │ │ │ ├── EmbeddedImportantComment.css │ │ │ ├── EmptyComments.css │ │ │ ├── HideFromIE5.css │ │ │ ├── HideFromIE6.css │ │ │ ├── HideFromMacIE.css │ │ │ ├── HideFromNS4.css │ │ │ ├── ImportantComment.css │ │ │ ├── ImportantCommentHacks.css │ │ │ ├── OnlyNS4.css │ │ │ ├── SharepointThemes.css │ │ │ ├── SingleLine.css │ │ │ └── TwoImportantComments.css │ │ │ ├── Declarations │ │ │ ├── NoTrailingSemicolon.css │ │ │ └── TrailingSemicolon.css │ │ │ ├── EmbeddedAspNetBlock │ │ │ ├── StringWithBlock.css │ │ │ └── TopLevel.css │ │ │ ├── Encoding │ │ │ ├── empty.css │ │ │ └── escaped.css │ │ │ ├── Errors │ │ │ ├── BadRGB.css │ │ │ ├── Exponent.css │ │ │ ├── InvalidClassName.css │ │ │ ├── ParsingErrors.css │ │ │ └── UnterminatedString.css │ │ │ ├── Hacks │ │ │ └── IEhacks.css │ │ │ ├── Replacements │ │ │ ├── ColorNames.css │ │ │ ├── CssReplacementTokens.css │ │ │ ├── Ie8Eot.css │ │ │ ├── MajorColors.css │ │ │ ├── StringReplacement.css │ │ │ ├── ValueReplacement.Designer.cs │ │ │ ├── ValueReplacement.css │ │ │ └── ValueReplacement.resx │ │ │ ├── Selectors │ │ │ ├── Any.css │ │ │ ├── Attribute.css │ │ │ ├── Bootstrap4CssVariables.css │ │ │ ├── CSS3.css │ │ │ ├── Combinator.css │ │ │ ├── Escapes.css │ │ │ ├── Grouping.css │ │ │ ├── MatchCasing.css │ │ │ ├── Namespace.css │ │ │ ├── NoSpaceUniversal.css │ │ │ ├── Not.css │ │ │ ├── PseudoClass.css │ │ │ ├── PseudoElement.css │ │ │ ├── PseudoFunctions.css │ │ │ ├── Simple.css │ │ │ └── Universal.css │ │ │ ├── Switches │ │ │ └── EchoInput.css │ │ │ ├── Syntax │ │ │ ├── AlphaHash.css │ │ │ ├── CDO.css │ │ │ ├── Escapes.css │ │ │ ├── Expr.css │ │ │ ├── Expression.css │ │ │ ├── FontNames.css │ │ │ ├── Function.css │ │ │ ├── Important.css │ │ │ ├── PointZeroEms.css │ │ │ ├── RgbWithFunc.css │ │ │ ├── RgbWithSpace.css │ │ │ ├── Strings.css │ │ │ ├── Term.css │ │ │ ├── UnicodeRange.css │ │ │ └── uri.css │ │ │ └── Values │ │ │ ├── Attr.css │ │ │ ├── Calc.css │ │ │ ├── Cycle.css │ │ │ ├── Grids.css │ │ │ ├── Toggle.css │ │ │ ├── Units.css │ │ │ ├── Zeros.css │ │ │ └── progid.css │ ├── Core │ │ ├── Expected │ │ │ ├── ManifestTask │ │ │ │ ├── test1.css │ │ │ │ ├── test1.js │ │ │ │ ├── test1_pponly.js │ │ │ │ ├── test2.js │ │ │ │ ├── test2_pponly.js │ │ │ │ ├── test_bundle.css │ │ │ │ ├── test_bundle.js │ │ │ │ ├── test_ext.js │ │ │ │ └── test_resx.js │ │ │ ├── NUglifyTask │ │ │ │ ├── Combined.min.css │ │ │ │ ├── Combined.min.js │ │ │ │ ├── CombinedKill.min.css │ │ │ │ ├── CombinedKill.min.js │ │ │ │ ├── file1.min.js │ │ │ │ ├── file2.min.js │ │ │ │ ├── test1.min.css │ │ │ │ └── test2.min.css │ │ │ ├── ReplacementTokens │ │ │ │ └── Replacements.css │ │ │ └── SourceChange.js │ │ ├── Input │ │ │ ├── CssEncoding │ │ │ │ ├── empty.css │ │ │ │ ├── utf16.css │ │ │ │ ├── utf8ascii.css │ │ │ │ ├── utf8none.css │ │ │ │ └── utf8utf8.css │ │ │ ├── Frameworks │ │ │ │ ├── NoErrors.csv │ │ │ │ ├── bootstrap-dropdown.js │ │ │ │ ├── jquery-1.3.2.js │ │ │ │ ├── jquery-1.4.1.js │ │ │ │ ├── jquery-1.4.2.js │ │ │ │ ├── jquery-1.5.1.js │ │ │ │ ├── jquery-1.5.2.js │ │ │ │ ├── jquery-1.6.1.js │ │ │ │ ├── jquery-1.7.1.js │ │ │ │ ├── jquery-1.7.2.js │ │ │ │ ├── jquery-1.8.0.js │ │ │ │ ├── jquery-1.8.2.js │ │ │ │ ├── jquery-2.0.0.js │ │ │ │ ├── jquery-ui-1.8.19.js │ │ │ │ ├── modernizr-2.0.6.js │ │ │ │ ├── prototype-1.7.1.js │ │ │ │ └── prototype.1.17.js │ │ │ ├── ManifestTask │ │ │ │ ├── HasError.css │ │ │ │ ├── HasError.js │ │ │ │ ├── ManifestExternal.xml │ │ │ │ ├── ManifestFail.xml │ │ │ │ ├── ManifestNoWarn.xml │ │ │ │ ├── ManifestWarn.xml │ │ │ │ ├── Manifest_bundle.xml │ │ │ │ ├── Manifest_resx.xml │ │ │ │ ├── Manifestjq2.xml │ │ │ │ ├── Strings.Designer.cs │ │ │ │ ├── Strings.resx │ │ │ │ ├── WithWarnings.js │ │ │ │ ├── external.min.js │ │ │ │ ├── file1.css │ │ │ │ ├── file1.js │ │ │ │ ├── file2.css │ │ │ │ ├── file2.js │ │ │ │ ├── file3.css │ │ │ │ ├── file3.js │ │ │ │ ├── file4.js │ │ │ │ ├── file5.js │ │ │ │ ├── file_resx.js │ │ │ │ ├── jquery-2.0.0.min.js │ │ │ │ ├── manifest.xml │ │ │ │ ├── manifest_pponly.xml │ │ │ │ ├── test.Designer.cs │ │ │ │ └── test.resx │ │ │ ├── NUglifyTask │ │ │ │ ├── Fail.css │ │ │ │ ├── Fail.js │ │ │ │ ├── file1.js │ │ │ │ ├── file2.js │ │ │ │ ├── test1.css │ │ │ │ └── test2.css │ │ │ ├── Preprocessor │ │ │ │ ├── SourceDirective.css │ │ │ │ └── SourceDirective.js │ │ │ ├── ReplacementTokens │ │ │ │ └── Replacements.css │ │ │ └── SourceChange.js │ │ └── NotExpressions.csv │ ├── HTML │ │ └── tidy-html5-tests │ │ │ └── html5 │ │ │ ├── article.org.html │ │ │ ├── aside.org.html │ │ │ ├── atemplate.org.html │ │ │ ├── bdi.org.html │ │ │ ├── datalist.org.html │ │ │ ├── datalist2.org.html │ │ │ ├── datalist3.org.html │ │ │ ├── details.org.html │ │ │ ├── dialog.org.html │ │ │ ├── figure.org.html │ │ │ ├── footer.org.html │ │ │ ├── formselect.org.html │ │ │ ├── formselect2.org.html │ │ │ ├── header.org.html │ │ │ ├── html4 │ │ │ ├── acronym4.html │ │ │ ├── acronym5.html │ │ │ ├── align5.html │ │ │ ├── applet4.html │ │ │ ├── applet5.html │ │ │ ├── basefont4.html │ │ │ ├── basefont5.html │ │ │ ├── big4.html │ │ │ ├── big5.html │ │ │ ├── blink5.html │ │ │ ├── bodyatts5.html │ │ │ ├── center25.html │ │ │ ├── center4.html │ │ │ ├── center5.html │ │ │ ├── dir4.html │ │ │ ├── dir5.html │ │ │ ├── font4.html │ │ │ ├── font5.html │ │ │ ├── frame_a.htm │ │ │ ├── frame_b.htm │ │ │ ├── frame_c.htm │ │ │ ├── frameset4.html │ │ │ ├── frameset5.html │ │ │ ├── index2.html │ │ │ ├── marquee5.html │ │ │ ├── strike4.html │ │ │ ├── strike5.html │ │ │ ├── tt4.html │ │ │ └── tt5.html │ │ │ ├── keygen.org.html │ │ │ ├── main.org.html │ │ │ ├── mark.org.html │ │ │ ├── mav.org.html │ │ │ ├── menuitem.org.html │ │ │ ├── meter.org.html │ │ │ ├── min.org.html │ │ │ ├── output.org.html │ │ │ ├── progress.org.html │ │ │ ├── removed.org.html │ │ │ ├── rp.org.html │ │ │ ├── section.org.html │ │ │ ├── select2.org.html │ │ │ ├── summary.org.html │ │ │ ├── time.org.html │ │ │ ├── video.org.html │ │ │ └── wbr.org.html │ └── JS │ │ ├── Expected │ │ ├── ArrayHandling │ │ │ ├── Array.js │ │ │ ├── Array_L.js │ │ │ ├── Join.js │ │ │ ├── Length.js │ │ │ ├── Reverse.js │ │ │ ├── Sort.js │ │ │ └── Spread.js │ │ ├── AspNet │ │ │ ├── Blocks.js │ │ │ ├── Expressions.js │ │ │ └── Identifiers.js │ │ ├── Assignments │ │ │ ├── Assign.js │ │ │ ├── AssignAspNetBlock.js │ │ │ ├── Assign_utf8.js │ │ │ ├── CompoundAssign.js │ │ │ ├── MultiVars.js │ │ │ └── PlusAssignReturn.js │ │ ├── AstMods │ │ │ ├── AspNet.js │ │ │ ├── CallToMember.js │ │ │ ├── ConstantIf.js │ │ │ ├── DateGetTimeToUnaryPlus.js │ │ │ ├── DateGetTimeToUnaryPlus_H.js │ │ │ ├── EvalLength.js │ │ │ ├── ExpressionIf.js │ │ │ ├── IfContinue.js │ │ │ ├── IfReturn.js │ │ │ ├── LiteralExpressions.js │ │ │ ├── LiteralOverflows.js │ │ │ ├── LiteralsFarToLeft.js │ │ │ ├── LiteralsFarToRight.js │ │ │ ├── LiteralsToLeft.js │ │ │ ├── LiteralsToRight.js │ │ │ ├── MoveFunctions.js │ │ │ ├── NegShortcutIf.js │ │ │ ├── NestedIf.js │ │ │ ├── ReturnAssignOp.js │ │ │ ├── SimplifyStrToNum.js │ │ │ ├── SimplifyStrToNum_noeval.js │ │ │ ├── StrictToRegular.js │ │ │ ├── VerticalTab.js │ │ │ ├── amd.js │ │ │ ├── amd_amd.js │ │ │ └── opAssignCombine.js │ │ ├── BlockOpts │ │ │ ├── AfterReturn.js │ │ │ ├── AfterReturn_noreloc.js │ │ │ ├── AspNetBlock.js │ │ │ ├── CombineAssign.js │ │ │ ├── DirectivePrologue.js │ │ │ ├── ExprReturn.js │ │ │ ├── IfReturnReturn.js │ │ │ ├── KillIfReturn.js │ │ │ ├── ReturnIfs.js │ │ │ ├── ReturnLiteral.js │ │ │ ├── ReturnVoid.js │ │ │ ├── VarAssign.js │ │ │ ├── VarIntoFor.js │ │ │ └── VarReturn.js │ │ ├── Booleans │ │ │ └── Boolean.js │ │ ├── Bugs │ │ │ ├── Bug120.js │ │ │ ├── Bug138.js │ │ │ ├── Bug139.js │ │ │ ├── Bug156.js │ │ │ ├── Bug159.js │ │ │ ├── Bug160.js │ │ │ ├── Bug163.js │ │ │ ├── Bug197.js │ │ │ ├── Bug199JS.js │ │ │ ├── Bug199JSON.json │ │ │ ├── Bug200.js │ │ │ ├── Bug201.js │ │ │ ├── Bug204.js │ │ │ ├── Bug205.js │ │ │ ├── Bug214.js │ │ │ ├── Bug215.js │ │ │ ├── Bug216.js │ │ │ ├── Bug241.js │ │ │ ├── Bug253.js │ │ │ ├── Bug264.js │ │ │ ├── Bug266.js │ │ │ ├── Bug274.js │ │ │ ├── Bug279.js │ │ │ ├── Bug284.js │ │ │ ├── Bug285.js │ │ │ ├── Bug290.js │ │ │ ├── Bug293.js │ │ │ ├── Bug298.js │ │ │ ├── Bug300.js │ │ │ ├── Bug301.js │ │ │ ├── Bug305.js │ │ │ ├── Bug306.json │ │ │ ├── Bug345.js │ │ │ ├── Bug35.js │ │ │ ├── Bug353.js │ │ │ ├── Bug360.js │ │ │ ├── Bug375.js │ │ │ ├── Bug391.js │ │ │ ├── Bug394.js │ │ │ ├── Bug403.js │ │ │ ├── Bug429.js │ │ │ ├── Bug57.js │ │ │ ├── Bug63.js │ │ │ ├── Bug70.js │ │ │ ├── Bug76.js │ │ │ ├── Bug78.js │ │ │ ├── Bug79.js │ │ │ ├── Bug80.js │ │ │ ├── Bug87.js │ │ │ ├── Bug92.js │ │ │ └── Bug94.js │ │ ├── CatchVariable │ │ │ ├── Ambiguous.js │ │ │ ├── Ambiguous_h.js │ │ │ ├── Collision.js │ │ │ ├── ForInLet.js │ │ │ ├── ForInLet_h.js │ │ │ ├── NoOuter.js │ │ │ ├── NoOuter_h.js │ │ │ ├── OuterIsGlobal.js │ │ │ ├── OuterNotRef.js │ │ │ └── OuterNotRef_h.js │ │ ├── Classes │ │ │ ├── ClassDecl.js │ │ │ ├── ClassErrors.js │ │ │ ├── ClassExpr.js │ │ │ └── ClassNormalAndStaticProperty.js │ │ ├── CommandLine │ │ │ ├── ConcatSemicolons.js │ │ │ ├── EventHandler.js │ │ │ ├── Expression.js │ │ │ ├── Expression_json.json │ │ │ ├── Expression_prog.js │ │ │ ├── Globals.js │ │ │ ├── PreprocessOnly.js │ │ │ ├── TermSemi1.js │ │ │ ├── TermSemi1_expr.js │ │ │ ├── TermSemi2.js │ │ │ └── json.js │ │ ├── Comments │ │ │ ├── Comment.js │ │ │ ├── EndWithImportantComment.js │ │ │ ├── Globals.js │ │ │ ├── ImportantComment.js │ │ │ ├── ImportantComment_Off.js │ │ │ ├── ImportantIgnore.js │ │ │ ├── OnlyImportantComment.js │ │ │ └── TwoImportantComments.js │ │ ├── Comprehensions │ │ │ ├── ArrayComp.js │ │ │ ├── GeneratorComp.js │ │ │ └── NoParens.js │ │ ├── ConditionalCompilation │ │ │ ├── DoubleStart.js │ │ │ ├── EndEOF.js │ │ │ ├── FuncDecl.js │ │ │ ├── IETest.js │ │ │ ├── IfElse.js │ │ │ ├── MultipleOn.js │ │ │ ├── MultipleOn_kill.js │ │ │ ├── NoEnd.js │ │ │ ├── PPConstant.js │ │ │ ├── PPOps.js │ │ │ ├── Set.js │ │ │ ├── SpecialCase.js │ │ │ ├── SpecialCase2.js │ │ │ ├── StartWithIf.js │ │ │ ├── StartWithSet.js │ │ │ └── TypeComments.js │ │ ├── ControlFlow │ │ │ ├── Break.js │ │ │ ├── BreakLabel.js │ │ │ ├── BreakNoLabel.js │ │ │ ├── CatchScope.js │ │ │ ├── CatchScope_Local.js │ │ │ ├── Continue.js │ │ │ ├── Continue_inv.js │ │ │ ├── Debugger.js │ │ │ ├── Debugger_D.js │ │ │ ├── Debugger_OffCustom.js │ │ │ ├── Debugger_OffNone.js │ │ │ ├── Debugger_OnCustom.js │ │ │ ├── DoWhile.js │ │ │ ├── DoWhile_3.js │ │ │ ├── EncloseBlock.js │ │ │ ├── EncloseBlock_nominify.js │ │ │ ├── ForIn.js │ │ │ ├── ForNoIn.js │ │ │ ├── ForNoIn_kill.js │ │ │ ├── ForVar.js │ │ │ ├── ForVar_reorder.js │ │ │ ├── ForWhile.js │ │ │ ├── If.js │ │ │ ├── Labels.js │ │ │ ├── Labels_H.js │ │ │ ├── Labels_keep.js │ │ │ ├── Return.js │ │ │ ├── Switch.js │ │ │ ├── Switch_h.js │ │ │ ├── Throw.js │ │ │ ├── Throw_M.js │ │ │ ├── TryCatch.js │ │ │ ├── TryCatch_m.js │ │ │ ├── While.js │ │ │ ├── While_ForNoVar.js │ │ │ └── While_NoFor.js │ │ ├── DebugNamespaces │ │ │ ├── ConsoleDebug.js │ │ │ ├── DebugAsKnownGlobal.js │ │ │ ├── DebugAsKnownGlobal_debug.js │ │ │ ├── DebugAsKnownGlobal_release.js │ │ │ ├── DebugNamespaceDirective.js │ │ │ └── EmptyIf.js │ │ ├── Declarations │ │ │ ├── Const.js │ │ │ ├── Const_moz.js │ │ │ ├── Function.js │ │ │ ├── Identifiers.js │ │ │ ├── Identifiers_ascii.js │ │ │ ├── Identifiers_h.js │ │ │ ├── LocalizationVars.js │ │ │ ├── LocalizationVars_H.js │ │ │ ├── LocalizationVars_HL.js │ │ │ ├── New.js │ │ │ ├── This.js │ │ │ ├── Var.js │ │ │ ├── Var_keep.js │ │ │ ├── With.js │ │ │ └── With_H.js │ │ ├── ES2015 │ │ │ ├── ArrayMatching.js │ │ │ ├── BaseClassAccessor.js │ │ │ ├── BlockScopeFunctions.js │ │ │ ├── BlockScopeVariables.js │ │ │ ├── ClassDefinition.js │ │ │ ├── ClassInheritance.js │ │ │ ├── ClassInheritanceAssignment.js │ │ │ ├── ClassInheritanceExpressions.js │ │ │ ├── ConciseMethods.js │ │ │ ├── ConciseProperties.js │ │ │ ├── ConstDeclaration.js │ │ │ ├── DefaultParameters.js │ │ │ ├── DestructuringAssignment.js │ │ │ ├── ExpressionBodies.js │ │ │ ├── ExpressionBodiesWithDestructuring.js │ │ │ ├── GeneratorControlFlow.js │ │ │ ├── GeneratorFunction.js │ │ │ ├── GeneratorFunctionDirect.js │ │ │ ├── GeneratorMatching.js │ │ │ ├── GeneratorMethods.js │ │ │ ├── IteratorsForEach.js │ │ │ ├── MethodProperties.js │ │ │ ├── Modules.js │ │ │ ├── ObjectMatching.js │ │ │ ├── ObjectSpreadOperator.js │ │ │ ├── ParameterContextMatching.js │ │ │ ├── Proxying.js │ │ │ ├── RestParameters.js │ │ │ ├── SpreadOperator.js │ │ │ ├── StatementBodies.js │ │ │ ├── StaticMembers.js │ │ │ ├── StringInterpolation.js │ │ │ └── TaggedTemplates.js │ │ ├── ES2016 │ │ │ ├── Exponent.js │ │ │ └── ExponentAssign.js │ │ ├── ES2017 │ │ │ ├── AsyncArrowFunction.js │ │ │ ├── AsyncAwait.js │ │ │ ├── AsyncClassFunction.js │ │ │ ├── AsyncFunctionExpressions.js │ │ │ ├── MultipleAwaitExpression.js │ │ │ └── TrailingComma.js │ │ ├── ES2018 │ │ │ ├── ForAwait.js │ │ │ └── SpreadOperator.js │ │ ├── ES2019 │ │ │ └── OptionalCatchBinding.js │ │ ├── ES2020 │ │ │ ├── BigIntInitialisation.js │ │ │ ├── GlobalThis.js │ │ │ ├── NullCoalesce.js │ │ │ ├── NullCoalesceAndOr.js │ │ │ └── OptionalChaining.js │ │ ├── ES2021 │ │ │ ├── LogicalAndAssign.js │ │ │ ├── LogicalNullishAssign.js │ │ │ ├── LogicalOrAssign.js │ │ │ ├── NumericSeparatorsBinary1.js │ │ │ ├── NumericSeparatorsBinary2.js │ │ │ ├── NumericSeparatorsDecimal1.js │ │ │ ├── NumericSeparatorsDecimal2.js │ │ │ ├── NumericSeparatorsDecimalAfter.js │ │ │ ├── NumericSeparatorsDecimalBefore.js │ │ │ ├── NumericSeparatorsExponent1.js │ │ │ ├── NumericSeparatorsExponent2.js │ │ │ ├── NumericSeparatorsExponentAfter.js │ │ │ ├── NumericSeparatorsExponentBefore.js │ │ │ ├── NumericSeparatorsHex1.js │ │ │ ├── NumericSeparatorsHex2.js │ │ │ ├── NumericSeparatorsInteger.js │ │ │ ├── NumericSeparatorsNoAdjacent.js │ │ │ ├── NumericSeparatorsNoTrailing.js │ │ │ ├── NumericSeparatorsOctal1.js │ │ │ └── NumericSeparatorsOctal2.js │ │ ├── Encodings │ │ │ ├── SurrogateHighError.js │ │ │ ├── SurrogateLowError.js │ │ │ ├── UnicodeExtended.js │ │ │ └── UnicodeExtended_ascii.js │ │ ├── FunctionCreation │ │ │ ├── Arguments.js │ │ │ ├── ArrowConstructor.js │ │ │ ├── ArrowFunctionAsArgument.js │ │ │ ├── ArrowFunctions.js │ │ │ ├── ArrowFunctions_h.js │ │ │ ├── BadLocation.js │ │ │ ├── BadSemicolon.js │ │ │ ├── DefaultValues.js │ │ │ ├── FuncExpr.js │ │ │ ├── FunctionNames.js │ │ │ ├── Generator.js │ │ │ ├── NamedFuncExpr.js │ │ │ ├── NamedFuncExpr_h.js │ │ │ ├── NamedFuncExpr_hlock.js │ │ │ ├── NamedFuncExpr_hnfe.js │ │ │ ├── NamedFuncExpr_nfe.js │ │ │ ├── NamedFuncExpr_reorder.js │ │ │ ├── NewFunction.js │ │ │ └── VarArgList.js │ │ ├── GlobalMethods │ │ │ ├── AssumedGlobals.js │ │ │ ├── BrowserSpecific.js │ │ │ ├── DOMElements.js │ │ │ ├── Eval.js │ │ │ ├── GlobalObject.js │ │ │ └── SpecialEval.js │ │ ├── LexicalDeclarations │ │ │ ├── ConstAssign.js │ │ │ ├── LexBlock.js │ │ │ ├── LexConst.js │ │ │ ├── LexConst_ES6.js │ │ │ ├── LexConst_mozilla.js │ │ │ ├── LexDuplicate.js │ │ │ ├── LexFor.js │ │ │ ├── LexForIn.js │ │ │ ├── LexLet.js │ │ │ ├── LexSwitch.js │ │ │ └── LexVarCollision.js │ │ ├── Literals │ │ │ ├── ArrayLiteral.js │ │ │ ├── AspNetString.js │ │ │ ├── Boolean.js │ │ │ ├── CombineNegs.js │ │ │ ├── Combined_h.js │ │ │ ├── Combined_hc.js │ │ │ ├── GetterSetter.js │ │ │ ├── InlineSafe.js │ │ │ ├── InlineSafeErrors.js │ │ │ ├── InlineSafeErrors_on.js │ │ │ ├── InlineSafe_no.js │ │ │ ├── LoneHighSurrogate.js │ │ │ ├── LoneLowSurrogate.js │ │ │ ├── Member.js │ │ │ ├── Member_Preserve.js │ │ │ ├── NestedCombine.js │ │ │ ├── NullCharacter.js │ │ │ ├── Number.js │ │ │ ├── ObjectLiteral.js │ │ │ ├── ObjectLiteral_quote.js │ │ │ ├── Octal.js │ │ │ ├── RegExp.js │ │ │ ├── Replace.js │ │ │ ├── StrictEncoding.js │ │ │ ├── Strings.js │ │ │ ├── Strings_3.js │ │ │ ├── Strings_h.js │ │ │ ├── Strings_utf.js │ │ │ ├── TemplateLiterals.js │ │ │ ├── TemplateLiteralsEscaped.js │ │ │ ├── TemplateLiterals_nomin.js │ │ │ └── strings_k.js │ │ ├── Modules │ │ │ ├── BadExport.js │ │ │ ├── CircularExternal.js │ │ │ ├── ExportCombine.js │ │ │ ├── ExportRename.js │ │ │ ├── Exports.js │ │ │ ├── Header.js │ │ │ ├── ImportAssign.js │ │ │ ├── ImportRename.js │ │ │ ├── Imports.js │ │ │ ├── Module.js │ │ │ ├── NoExportExternal.js │ │ │ ├── NoExportExternal_flatten.js │ │ │ ├── NoExportInline.js │ │ │ ├── NotModules.js │ │ │ └── ReExport.js │ │ ├── NoMinify │ │ │ └── EmptyElse.js │ │ ├── ObjectCreation │ │ │ ├── CompareObjects.js │ │ │ ├── Constructor.js │ │ │ ├── Constructor_H.js │ │ │ ├── Constructor_hc.js │ │ │ ├── InstanceOf.js │ │ │ ├── Object.js │ │ │ ├── Object_H.js │ │ │ ├── Object_L.js │ │ │ ├── Object_hc.js │ │ │ ├── Prototype.js │ │ │ ├── RegularExpressions.js │ │ │ ├── Strings.js │ │ │ ├── Strings_Utf8.js │ │ │ ├── ToStr.js │ │ │ └── TypeOf.js │ │ ├── Operators │ │ │ ├── AddressOf.js │ │ │ ├── Assign.js │ │ │ ├── Associative.js │ │ │ ├── Comma.js │ │ │ ├── Conditional.js │ │ │ ├── ConditionalPrecedence.js │ │ │ ├── In.js │ │ │ ├── InstanceOf.js │ │ │ ├── Member.js │ │ │ ├── New.js │ │ │ ├── NewPrecedence.js │ │ │ ├── Strict.js │ │ │ ├── TypeOf.js │ │ │ ├── Unary.js │ │ │ └── Void.js │ │ ├── Preprocessor │ │ │ ├── BadDefines.js │ │ │ ├── BadIfDef.js │ │ │ ├── DebugClear.js │ │ │ ├── DebugSet.js │ │ │ ├── DebugSet_debug.js │ │ │ ├── DefineIf.js │ │ │ ├── DefineIf_defines.js │ │ │ ├── Defines.js │ │ │ ├── Defines_ackbar.js │ │ │ ├── Defines_ackbarmeow.js │ │ │ ├── Nested.js │ │ │ └── SourceDirective.js │ │ ├── Renaming │ │ │ ├── IfFunction.js │ │ │ ├── LabelKeyword.js │ │ │ ├── ManualRename.js │ │ │ ├── ManualRename_all.js │ │ │ ├── ManualRename_cmd.js │ │ │ ├── ManualRename_collide.js │ │ │ ├── ManualRename_noprops.js │ │ │ ├── ManualRename_norename.js │ │ │ ├── ManualRename_rename.js │ │ │ ├── NestedGlobals.js │ │ │ ├── NoMunge.js │ │ │ ├── SafeAll.js │ │ │ ├── SafeAll_imm.js │ │ │ ├── Super.js │ │ │ └── evalImmediate.js │ │ ├── ResourceMerge │ │ │ ├── ReplacementTokens.js │ │ │ ├── ResourceJS.js │ │ │ ├── ResourceResx.js │ │ │ ├── ResourceResx_I.js │ │ │ ├── Resources.js │ │ │ └── StringsFooBar.js │ │ ├── ScannerErrors │ │ │ ├── BadHexDigit.js │ │ │ ├── StringEOF.js │ │ │ ├── StringEOL.js │ │ │ └── UnexpectedNull.js │ │ ├── SourceMap │ │ │ ├── MapArgNotSpecified.js │ │ │ ├── ScriptSharpMap_TwoInputs.js │ │ │ ├── ScriptSharpMap_TwoInputs.js.map │ │ │ ├── SourceMapForMultipleFiles.js │ │ │ ├── SourceMapForMultipleFiles.js.map │ │ │ ├── SourceMapV3.js │ │ │ └── SourceMapV3.js.map │ │ ├── StdIn │ │ │ └── StdInTest.js │ │ ├── Strict │ │ │ ├── DupArg.js │ │ │ ├── DupProperty.js │ │ │ ├── EvalArgsAssign.js │ │ │ ├── ExtraUseStrict.js │ │ │ ├── FuncDeclLoc.js │ │ │ ├── FuncDeclStrict.js │ │ │ ├── InvalidDelete.js │ │ │ ├── InvalidVarName.js │ │ │ ├── StrictPartial.js │ │ │ ├── StrictSwitchOn.js │ │ │ ├── UnknownGlobal.js │ │ │ └── With.js │ │ ├── Switch │ │ │ ├── Braces.js │ │ │ ├── Braces_new.js │ │ │ ├── Braces_same.js │ │ │ ├── Braces_source.js │ │ │ ├── EmptyDefault.js │ │ │ ├── EmptyDefault_h.js │ │ │ ├── IgnoreErrors.js │ │ │ ├── IgnoreErrors_all.js │ │ │ ├── IgnoreErrors_some.js │ │ │ ├── LineBreak.js │ │ │ ├── LineBreak_BreakMultiIndent.js │ │ │ ├── LineBreak_BreakSingle.js │ │ │ ├── LineBreak_Multi.js │ │ │ ├── LineBreak_MultiIndent.js │ │ │ ├── MacQuirks.js │ │ │ ├── MacQuirks_M.js │ │ │ ├── NoBreakBreak.js │ │ │ ├── NoBreakContinue.js │ │ │ ├── NoBreakPostDec.js │ │ │ ├── NoBreakPostInc.js │ │ │ ├── NoBreakReturn.js │ │ │ ├── NoBreakThrow.js │ │ │ ├── NoDefaultEmptyCases.js │ │ │ ├── NoDefaultEmptyCases_h.js │ │ │ ├── PrettyPrint.js │ │ │ ├── PrettyPrint_P.js │ │ │ ├── PrettyPrint_same.js │ │ │ ├── PromoteBreak.js │ │ │ ├── PromoteBreak_h.js │ │ │ ├── SwitchLabels.js │ │ │ ├── SwitchLabels_h.js │ │ │ ├── Unreachable.js │ │ │ ├── culture_esZW.js │ │ │ ├── culture_fr.js │ │ │ ├── culture_hawUS.js │ │ │ └── culture_zhCN.js │ │ ├── Syntax │ │ │ ├── BOM.js │ │ │ ├── BindingPatterns.js │ │ │ ├── ES6.js │ │ │ ├── ES6_h.js │ │ │ ├── EmptyStatement.js │ │ │ ├── EmptyStatement_P.js │ │ │ ├── MissingMemberRoot.js │ │ │ ├── NestedBlocks.js │ │ │ ├── NonES6Yield.js │ │ │ ├── NonES6Yield_norename.js │ │ │ └── SlashSpacing.js │ │ ├── TC39 │ │ │ └── ClassFields.js │ │ ├── UnknownScope │ │ │ ├── Eval.js │ │ │ ├── Eval_Immediate.js │ │ │ ├── Eval_J.js │ │ │ ├── WindowEval.js │ │ │ └── With.js │ │ ├── VarDecls │ │ │ ├── OneRefIteration.js │ │ │ ├── UnRefForIn.js │ │ │ └── UnRefVar.js │ │ └── XmlInput │ │ │ ├── Combined.css │ │ │ ├── EncOutputNone.js │ │ │ ├── EncOutputNone_koi8r.js │ │ │ ├── EncOutputRussian.js │ │ │ ├── EncOutputRussian_big5.js │ │ │ ├── EncOutputRussian_big5out.js │ │ │ ├── FirstOutputFile.js │ │ │ ├── OneOutputFile.js │ │ │ ├── SecondOutputFile.js │ │ │ └── SecondOutputFile.xml │ │ └── Input │ │ ├── ArrayHandling │ │ ├── Array.js │ │ ├── Join.js │ │ ├── Length.js │ │ ├── Reverse.js │ │ ├── Sort.js │ │ └── Spread.js │ │ ├── AspNet │ │ ├── Blocks.js │ │ ├── Expressions.js │ │ └── Identifiers.js │ │ ├── Assignments │ │ ├── Assign.js │ │ ├── AssignAspNetBlock.js │ │ ├── CompoundAssign.js │ │ ├── MultiVars.js │ │ └── PlusAssignReturn.js │ │ ├── AstMods │ │ ├── AspNet.js │ │ ├── CallToMember.js │ │ ├── ConstantIf.js │ │ ├── DateGetTimeToUnaryPlus.js │ │ ├── EvalLength.js │ │ ├── ExpressionIf.js │ │ ├── IfContinue.js │ │ ├── IfReturn.js │ │ ├── LiteralExpressions.js │ │ ├── LiteralOverflows.js │ │ ├── LiteralsFarToLeft.js │ │ ├── LiteralsFarToRight.js │ │ ├── LiteralsToLeft.js │ │ ├── LiteralsToRight.js │ │ ├── MoveFunctions.js │ │ ├── NegShortcutIf.js │ │ ├── NestedIf.js │ │ ├── ReturnAssignOp.js │ │ ├── SimplifyStrToNum.js │ │ ├── StrictToRegular.js │ │ ├── VerticalTab.js │ │ ├── amd.js │ │ └── opAssignCombine.js │ │ ├── BlockOpts │ │ ├── AfterReturn.js │ │ ├── AspNetBlock.js │ │ ├── CombineAssign.js │ │ ├── DirectivePrologue.js │ │ ├── ExprReturn.js │ │ ├── IfReturnReturn.js │ │ ├── KillIfReturn.js │ │ ├── ReturnIfs.js │ │ ├── ReturnLiteral.js │ │ ├── ReturnVoid.js │ │ ├── VarAssign.js │ │ ├── VarIntoFor.js │ │ └── VarReturn.js │ │ ├── Booleans │ │ └── Boolean.js │ │ ├── Bugs │ │ ├── Bug120.js │ │ ├── Bug138.js │ │ ├── Bug139.js │ │ ├── Bug156.js │ │ ├── Bug159.js │ │ ├── Bug160.js │ │ ├── Bug163.js │ │ ├── Bug197.js │ │ ├── Bug199JS.js │ │ ├── Bug199JSON.json │ │ ├── Bug200.js │ │ ├── Bug201.js │ │ ├── Bug204.js │ │ ├── Bug205.js │ │ ├── Bug214.js │ │ ├── Bug215.js │ │ ├── Bug216.js │ │ ├── Bug241.js │ │ ├── Bug253.js │ │ ├── Bug264.js │ │ ├── Bug266.js │ │ ├── Bug274.js │ │ ├── Bug279.js │ │ ├── Bug284.js │ │ ├── Bug285.js │ │ ├── Bug290.js │ │ ├── Bug293.js │ │ ├── Bug298.js │ │ ├── Bug300.js │ │ ├── Bug301.js │ │ ├── Bug305.js │ │ ├── Bug306.json │ │ ├── Bug345.js │ │ ├── Bug35.js │ │ ├── Bug353.js │ │ ├── Bug360.js │ │ ├── Bug375.js │ │ ├── Bug391.js │ │ ├── Bug394.js │ │ ├── Bug403.js │ │ ├── Bug429.js │ │ ├── Bug57.js │ │ ├── Bug63.js │ │ ├── Bug70.js │ │ ├── Bug76.js │ │ ├── Bug78.js │ │ ├── Bug79.js │ │ ├── Bug80.js │ │ ├── Bug87.js │ │ ├── Bug92.js │ │ └── Bug94.js │ │ ├── CatchVariable │ │ ├── Ambiguous.js │ │ ├── Collision.js │ │ ├── ForInLet.js │ │ ├── NoOuter.js │ │ ├── OuterIsGlobal.js │ │ └── OuterNotRef.js │ │ ├── Classes │ │ ├── ClassDecl.js │ │ ├── ClassErrors.js │ │ ├── ClassExpr.js │ │ └── ClassNormalAndStaticProperty.js │ │ ├── CommandLine │ │ ├── ConcatSemicolons.js │ │ ├── EventHandler.js │ │ ├── Expression.js │ │ ├── Expression.json │ │ ├── Globals.js │ │ ├── PreprocessOnly.js │ │ ├── TermSemi1.js │ │ ├── TermSemi2.js │ │ ├── concat-partial1.js │ │ ├── concat-partial2.js │ │ ├── concat-partial3.js │ │ ├── concat-partial4.js │ │ ├── concat1.js │ │ ├── concat2.js │ │ └── json.js │ │ ├── Comments │ │ ├── Comment.js │ │ ├── EndWithImportantComment.js │ │ ├── Globals.js │ │ ├── ImportantComment.js │ │ ├── ImportantIgnore.js │ │ ├── OnlyImportantComment.js │ │ └── TwoImportantComments.js │ │ ├── Comprehensions │ │ ├── ArrayComp.js │ │ ├── GeneratorComp.js │ │ └── NoParens.js │ │ ├── ConditionalCompilation │ │ ├── DoubleStart.js │ │ ├── EndEOF.js │ │ ├── FuncDecl.js │ │ ├── IETest.js │ │ ├── IfElse.js │ │ ├── MultipleOn.js │ │ ├── NoEnd.js │ │ ├── PPConstant.js │ │ ├── PPOps.js │ │ ├── Set.js │ │ ├── SpecialCase.js │ │ ├── SpecialCase2.js │ │ ├── StartWithIf.js │ │ ├── StartWithSet.js │ │ └── TypeComments.js │ │ ├── ControlFlow │ │ ├── Break.js │ │ ├── BreakLabel.js │ │ ├── BreakNoLabel.js │ │ ├── CatchScope.js │ │ ├── Continue.js │ │ ├── Debugger.js │ │ ├── DoWhile.js │ │ ├── EncloseBlock.js │ │ ├── ForIn.js │ │ ├── ForNoIn.js │ │ ├── ForVar.js │ │ ├── ForWhile.js │ │ ├── If.js │ │ ├── Labels.js │ │ ├── Return.js │ │ ├── Switch.js │ │ ├── Throw.js │ │ ├── TryCatch.js │ │ └── While.js │ │ ├── DebugNamespaces │ │ ├── ConsoleDebug.js │ │ ├── DebugAsKnownGlobal.js │ │ ├── DebugNamespaceDirective.js │ │ └── EmptyIf.js │ │ ├── Declarations │ │ ├── Const.js │ │ ├── Function.js │ │ ├── Identifiers.js │ │ ├── LocalizationVars.js │ │ ├── New.js │ │ ├── This.js │ │ ├── Var.js │ │ └── With.js │ │ ├── ES2015 │ │ ├── ArrayMatching.js │ │ ├── BaseClassAccessor.js │ │ ├── BlockScopeFunctions.js │ │ ├── BlockScopeVariables.js │ │ ├── ClassDefinition.js │ │ ├── ClassInheritance.js │ │ ├── ClassInheritanceAssignment.js │ │ ├── ClassInheritanceExpressions.js │ │ ├── ConciseMethods.js │ │ ├── ConciseProperties.js │ │ ├── ConstDeclaration.js │ │ ├── DefaultParameters.js │ │ ├── DestructuringAssignment.js │ │ ├── ExpressionBodies.js │ │ ├── ExpressionBodiesWithDestructuring.js │ │ ├── GeneratorControlFlow.js │ │ ├── GeneratorFunction.js │ │ ├── GeneratorFunctionDirect.js │ │ ├── GeneratorMatching.js │ │ ├── GeneratorMethods.js │ │ ├── IteratorsForEach.js │ │ ├── MethodProperties.js │ │ ├── Modules.js │ │ ├── ObjectMatching.js │ │ ├── ObjectSpreadOperator.js │ │ ├── ParameterContextMatching.js │ │ ├── Proxying.js │ │ ├── RestParameters.js │ │ ├── SpreadOperator.js │ │ ├── StatementBodies.js │ │ ├── StaticMembers.js │ │ ├── StringInterpolation.js │ │ └── TaggedTemplates.js │ │ ├── ES2016 │ │ ├── Exponent.js │ │ └── ExponentAssign.js │ │ ├── ES2017 │ │ ├── AsyncArrowFunction.js │ │ ├── AsyncAwait.js │ │ ├── AsyncClassFunction.js │ │ ├── AsyncFunctionExpressions.js │ │ ├── MultipleAwaitExpression.js │ │ └── TrailingComma.js │ │ ├── ES2018 │ │ ├── ForAwait.js │ │ └── SpreadOperator.js │ │ ├── ES2019 │ │ └── OptionalCatchBinding.js │ │ ├── ES2020 │ │ ├── BigIntInitialisation.js │ │ ├── GlobalThis.js │ │ ├── NullCoalesce.js │ │ ├── NullCoalesceAndOr.js │ │ └── OptionalChaining.js │ │ ├── ES2021 │ │ ├── LogicalAndAssign.js │ │ ├── LogicalNullishAssign.js │ │ ├── LogicalOrAssign.js │ │ ├── NumericSeparatorsBinary1.js │ │ ├── NumericSeparatorsBinary2.js │ │ ├── NumericSeparatorsDecimal1.js │ │ ├── NumericSeparatorsDecimal2.js │ │ ├── NumericSeparatorsDecimalAfter.js │ │ ├── NumericSeparatorsDecimalBefore.js │ │ ├── NumericSeparatorsExponent1.js │ │ ├── NumericSeparatorsExponent2.js │ │ ├── NumericSeparatorsExponentAfter.js │ │ ├── NumericSeparatorsExponentBefore.js │ │ ├── NumericSeparatorsHex1.js │ │ ├── NumericSeparatorsHex2.js │ │ ├── NumericSeparatorsInteger.js │ │ ├── NumericSeparatorsNoAdjacent.js │ │ ├── NumericSeparatorsNoTrailing.js │ │ ├── NumericSeparatorsOctal1.js │ │ └── NumericSeparatorsOctal2.js │ │ ├── Encodings │ │ ├── SurrogateHighError.js │ │ ├── SurrogateLowError.js │ │ └── UnicodeExtended.js │ │ ├── FunctionCreation │ │ ├── Arguments.js │ │ ├── ArrowConstructor.js │ │ ├── ArrowFunctionAsArgument.js │ │ ├── ArrowFunctions.js │ │ ├── BadLocation.js │ │ ├── BadSemicolon.js │ │ ├── DefaultValues.js │ │ ├── FuncExpr.js │ │ ├── FunctionNames.js │ │ ├── Generator.js │ │ ├── NamedFuncExpr.js │ │ ├── NewFunction.js │ │ └── VarArgList.js │ │ ├── GlobalMethods │ │ ├── AssumedGlobals.js │ │ ├── BrowserSpecific.js │ │ ├── DOMElements.js │ │ ├── Eval.js │ │ ├── GlobalObject.js │ │ └── SpecialEval.js │ │ ├── LexicalDeclarations │ │ ├── ConstAssign.js │ │ ├── LexBlock.js │ │ ├── LexConst.js │ │ ├── LexDuplicate.js │ │ ├── LexFor.js │ │ ├── LexForIn.js │ │ ├── LexLet.js │ │ ├── LexSwitch.js │ │ └── LexVarCollision.js │ │ ├── Literals │ │ ├── ArrayLiteral.js │ │ ├── AspNetString.js │ │ ├── Boolean.js │ │ ├── CombineNegs.js │ │ ├── Combined.js │ │ ├── GetterSetter.js │ │ ├── InlineSafe.js │ │ ├── InlineSafeErrors.js │ │ ├── LoneHighSurrogate.js │ │ ├── LoneLowSurrogate.js │ │ ├── Member.js │ │ ├── NestedCombine.js │ │ ├── NullCharacter.js │ │ ├── Number.js │ │ ├── ObjectLiteral.js │ │ ├── Octal.js │ │ ├── RegExp.js │ │ ├── Replace.js │ │ ├── StrictEncoding.js │ │ ├── Strings.js │ │ ├── TemplateLiterals.js │ │ └── TemplateLiteralsEscaped.js │ │ ├── Modules │ │ ├── BadExport.js │ │ ├── CircularExternal.js │ │ ├── ExportCombine.js │ │ ├── ExportRename.js │ │ ├── Exports.js │ │ ├── Header.js │ │ ├── ImportAssign.js │ │ ├── ImportRename.js │ │ ├── Imports.js │ │ ├── Module.js │ │ ├── NoExportExternal.js │ │ ├── NoExportInline.js │ │ ├── NotModules.js │ │ ├── ReExport.js │ │ └── lib │ │ │ ├── Even.js │ │ │ ├── Odd.js │ │ │ └── TestModule.js │ │ ├── NoMinify │ │ └── EmptyElse.js │ │ ├── ObjectCreation │ │ ├── CompareObjects.js │ │ ├── Constructor.js │ │ ├── InstanceOf.js │ │ ├── Object.js │ │ ├── Prototype.js │ │ ├── RegularExpressions.js │ │ ├── Strings.js │ │ ├── ToStr.js │ │ └── TypeOf.js │ │ ├── Operators │ │ ├── AddressOf.js │ │ ├── Assign.js │ │ ├── Associative.js │ │ ├── Comma.js │ │ ├── Conditional.js │ │ ├── ConditionalPrecedence.js │ │ ├── In.js │ │ ├── InstanceOf.js │ │ ├── Member.js │ │ ├── New.js │ │ ├── NewPrecedence.js │ │ ├── Strict.js │ │ ├── TypeOf.js │ │ ├── Unary.js │ │ └── Void.js │ │ ├── Preprocessor │ │ ├── BadDefines.js │ │ ├── BadIfDef.js │ │ ├── DebugClear.js │ │ ├── DebugSet.js │ │ ├── DefineIf.js │ │ ├── Defines.js │ │ ├── Nested.js │ │ └── SourceDirective.js │ │ ├── Renaming │ │ ├── Collide.xml │ │ ├── IfFunction.js │ │ ├── LabelKeyword.js │ │ ├── ManualRename.js │ │ ├── NestedGlobals.js │ │ ├── NoMunge.js │ │ ├── NoRename.xml │ │ ├── Rename.xml │ │ ├── SafeAll.js │ │ ├── Super.js │ │ └── evalImmediate.js │ │ ├── ResourceMerge │ │ ├── ReplacementTokens.js │ │ ├── ResourceJS.js │ │ ├── ResourceJS_res.js │ │ ├── ResourceResx.js │ │ ├── ResourceResx.resx │ │ ├── Resources.js │ │ ├── Resources.resources │ │ ├── StringsFooBar.Designer.cs │ │ ├── StringsFooBar.js │ │ └── StringsFooBar.resx │ │ ├── ScannerErrors │ │ ├── BadHexDigit.js │ │ ├── StringEOF.js │ │ ├── StringEOL.js │ │ └── UnexpectedNull.js │ │ ├── SourceMap │ │ ├── .gitattributes │ │ ├── MapArgNotSpecified.js │ │ ├── ScriptSharpMap.js │ │ ├── SourceMapForMultipleFiles1.js │ │ ├── SourceMapForMultipleFiles2.js │ │ ├── SourceMapForMultipleFiles3.js │ │ └── SourceMapV3.js │ │ ├── StdIn │ │ └── StdInTest.js │ │ ├── Strict │ │ ├── DupArg.js │ │ ├── DupProperty.js │ │ ├── EvalArgsAssign.js │ │ ├── ExtraUseStrict.js │ │ ├── FuncDeclLoc.js │ │ ├── FuncDeclStrict.js │ │ ├── InvalidDelete.js │ │ ├── InvalidVarName.js │ │ ├── StrictPartial.xml │ │ ├── StrictPartial1.js │ │ ├── StrictPartial2.js │ │ ├── StrictPartial3.js │ │ ├── StrictSwitch1.js │ │ ├── StrictSwitch2.js │ │ ├── StrictSwitchOn.xml │ │ ├── UnknownGlobal.js │ │ └── With.js │ │ ├── Switch │ │ ├── Braces.js │ │ ├── EmptyDefault.js │ │ ├── IgnoreErrors.js │ │ ├── LineBreak.js │ │ ├── MacQuirks.js │ │ ├── NoBreakBreak.js │ │ ├── NoBreakContinue.js │ │ ├── NoBreakPostDec.js │ │ ├── NoBreakPostInc.js │ │ ├── NoBreakReturn.js │ │ ├── NoBreakThrow.js │ │ ├── NoDefaultEmptyCases.js │ │ ├── PrettyPrint.js │ │ ├── PromoteBreak.js │ │ ├── SwitchLabels.js │ │ ├── Unreachable.js │ │ └── culture.js │ │ ├── Syntax │ │ ├── BOM.js │ │ ├── BindingPatterns.js │ │ ├── ES6.js │ │ ├── EmptyStatement.js │ │ ├── MissingMemberRoot.js │ │ ├── NestedBlocks.js │ │ ├── NonES6Yield.js │ │ └── SlashSpacing.js │ │ ├── TC39 │ │ └── ClassFields.js │ │ ├── UnknownScope │ │ ├── Eval.js │ │ ├── WindowEval.js │ │ └── With.js │ │ ├── VarDecls │ │ ├── OneRefIteration.js │ │ ├── UnRefForIn.js │ │ └── UnRefVar.js │ │ └── XmlInput │ │ ├── .gitattributes │ │ ├── EncInput1.js │ │ ├── EncInput2.js │ │ ├── EncInputNone.xml │ │ ├── EncInputRussian.xml │ │ ├── Input1.css │ │ ├── Input1.js │ │ ├── Input2.css │ │ ├── Input2.js │ │ ├── Input3.js │ │ ├── XmlMixedType.xml │ │ ├── XmlOneOutputFile.xml │ │ ├── XmlTwoOutputFiles.xml │ │ └── XmlWithSymbolMap.xml └── project.json ├── NUglify.shared.targets ├── NUglify.sln ├── NUglify.sln.DotSettings ├── NUglify.sln.GhostDoc.xml ├── NUglify ├── BlockStart.cs ├── CommonData.cs ├── CommonSettings.cs ├── CommonStrings.Designer.cs ├── CommonStrings.resx ├── Configuration.cs ├── Css │ ├── CssColor.cs │ ├── CssColorCrunchResult.cs │ ├── CssColorName.cs │ ├── CssComment.cs │ ├── CssErrorCode.cs │ ├── CssParser.cs │ ├── CssScanner.cs │ ├── CssSettings.cs │ ├── CssStrings.Designer.cs │ ├── CssStrings.resx │ ├── CssToken.cs │ └── CssType.cs ├── CssEncoderFallback.cs ├── Helpers │ ├── Extensions.cs │ ├── Helpers.cs │ ├── ReflectionHelper.cs │ ├── StringBuilderPool.cs │ └── StringSlice.cs ├── Html │ ├── CharHelper.cs │ ├── ContentKind.cs │ ├── ElementKind.cs │ ├── EntityHelper.cs │ ├── HtmlAspDelimiter.cs │ ├── HtmlAttribute.cs │ ├── HtmlCDATA.cs │ ├── HtmlComment.cs │ ├── HtmlDOCTYPE.cs │ ├── HtmlDocument.cs │ ├── HtmlElement.cs │ ├── HtmlMinifier.cs │ ├── HtmlNode.cs │ ├── HtmlNodeExtensions.cs │ ├── HtmlParser.cs │ ├── HtmlRaw.cs │ ├── HtmlScriptStyleElement.cs │ ├── HtmlSettings.cs │ ├── HtmlTagDescriptor.cs │ ├── HtmlText.cs │ ├── HtmlTextBase.cs │ ├── HtmlToTextOptions.cs │ ├── HtmlWriterBase.cs │ ├── HtmlWriterToDOM.cs │ ├── HtmlWriterToHtml.cs │ ├── HtmlWriterToText.cs │ ├── SourceLocation.cs │ └── TagEndKind.cs ├── JSEncoderFallback2.cs ├── JavaScript │ ├── CodeSettings.cs │ ├── EvalTreatment.cs │ ├── GlobalDefineEventArgs.cs │ ├── IRenameable.cs │ ├── ISourceMap.cs │ ├── JSError.cs │ ├── JSKeyword.cs │ ├── JSParser.cs │ ├── JSScanner.cs │ ├── JSToken.cs │ ├── JSVariableField.cs │ ├── JScript.Designer.cs │ ├── JScript.resx │ ├── JavaScriptFormat.cs │ ├── JavaScriptSourceMode.cs │ ├── JsonParser.cs │ ├── LocalRenaming.cs │ ├── Missing.cs │ ├── NewModuleEventArgs.cs │ ├── ScriptSharpSourceMap.cs │ ├── SourceContext.cs │ ├── SourceMapFactory.cs │ ├── StringList.cs │ ├── Syntax │ │ ├── ActivationObject.cs │ │ ├── ArrayLiteral.cs │ │ ├── AspNetBlockNode.cs │ │ ├── AstNode.cs │ │ ├── AstNodeList.cs │ │ ├── BinaryExpression.cs │ │ ├── BindingIdentifier.cs │ │ ├── BindingTransform.cs │ │ ├── BlockScope.cs │ │ ├── BlockStatement.cs │ │ ├── BreakStatement.cs │ │ ├── CallExpression.cs │ │ ├── CatchScope.cs │ │ ├── ClassField.cs │ │ ├── ClassNode.cs │ │ ├── CommaExpression.cs │ │ ├── ComprehensionClause.cs │ │ ├── ComprehensionForClause.cs │ │ ├── ComprehensionIfClause.cs │ │ ├── ComprehensionNode.cs │ │ ├── ComputedPropertyField.cs │ │ ├── Conditional.cs │ │ ├── ConditionalCompilationComment.cs │ │ ├── ConditionalCompilationElse.cs │ │ ├── ConditionalCompilationElseIf.cs │ │ ├── ConditionalCompilationEnd.cs │ │ ├── ConditionalCompilationIf.cs │ │ ├── ConditionalCompilationOn.cs │ │ ├── ConditionalCompilationSet.cs │ │ ├── ConditionalCompilationStatement.cs │ │ ├── ConstStatement.cs │ │ ├── ConstantWrapper.cs │ │ ├── ConstantWrapperPP.cs │ │ ├── ContinueStatement.cs │ │ ├── CustomNode.cs │ │ ├── DebuggerNode.cs │ │ ├── Declaration.cs │ │ ├── DirectivePrologue.cs │ │ ├── DoWhileStatement.cs │ │ ├── EmptyStatement.cs │ │ ├── ExportStatement.cs │ │ ├── Expression.cs │ │ ├── ForInStatement.cs │ │ ├── ForStatement.cs │ │ ├── FunctionObject.cs │ │ ├── FunctionScope.cs │ │ ├── GetterSetter.cs │ │ ├── GlobalScope.cs │ │ ├── GroupingOperator.cs │ │ ├── IModuleReference.cs │ │ ├── INameDeclaration.cs │ │ ├── INameReference.cs │ │ ├── IfStatement.cs │ │ ├── ImportExportSpecifier.cs │ │ ├── ImportExportStatement.cs │ │ ├── ImportMetaCustomNode.cs │ │ ├── ImportStatement.cs │ │ ├── ImportantComment.cs │ │ ├── InitializerNode.cs │ │ ├── IterationStatement.cs │ │ ├── LabeledStatement.cs │ │ ├── LexicalDeclaration.cs │ │ ├── LookupExpression.cs │ │ ├── MemberExpression.cs │ │ ├── ModuleDeclaration.cs │ │ ├── ModuleScope.cs │ │ ├── ObjectLiteral.cs │ │ ├── ObjectLiteralField.cs │ │ ├── ObjectLiteralProperty.cs │ │ ├── OperatorPrecedence.cs │ │ ├── ParameterDeclaration.cs │ │ ├── PrimitiveType.cs │ │ ├── RegExpLiteral.cs │ │ ├── ReturnStatement.cs │ │ ├── ScopeType.cs │ │ ├── Statement.cs │ │ ├── SwitchCase.cs │ │ ├── SwitchStatement.cs │ │ ├── TemplateLiteral.cs │ │ ├── TemplateLiteralExpression.cs │ │ ├── ThisLiteral.cs │ │ ├── ThrowStatement.cs │ │ ├── TryStatement.cs │ │ ├── UnaryExpression.cs │ │ ├── VarDeclaration.cs │ │ ├── VariableDeclaration.cs │ │ ├── WhileStatement.cs │ │ ├── WithScope.cs │ │ └── WithStatement.cs │ ├── UpdateHint.cs │ ├── V3SourceMap.cs │ ├── Visitors │ │ ├── AnalyzeNodeVisitor.cs │ │ ├── BindingsVisitor.cs │ │ ├── DetachReferencesVisitor.cs │ │ ├── EvaluateLiteralVisitor.cs │ │ ├── FinalPassVisitor.cs │ │ ├── IVisitor.cs │ │ ├── JsonOutputVisitor.cs │ │ ├── LogicalNotVisitor.cs │ │ ├── MatchPropertiesVisitor.cs │ │ ├── NewParensVisitor.cs │ │ ├── OutputVisitor.cs │ │ ├── ReferencesVisitor.cs │ │ ├── ReorderScopeVisitor.cs │ │ ├── RequiresSeparatorVisitor.cs │ │ ├── ResolutionVisitor.cs │ │ ├── StatementStartVisitor.cs │ │ └── TreeVisitor.cs │ ├── crunchenumerator.cs │ └── documentcontext.cs ├── NUglify.csproj ├── NUglify.nuget.targets ├── Nuglify.xproj.DotSettings ├── OutputMode.cs ├── ResourceStrings.cs ├── Uglify.cs ├── UglifyCommandParser.cs ├── UglifyError.cs ├── UglifyResult.cs └── key.snk └── NUglifyApp ├── App.config ├── DefaultScopeReport.cs ├── GlobalSuppressions.cs ├── IScopeReport.cs ├── MainClass-Css.cs ├── MainClass-JS.cs ├── MainClass.cs ├── ManifestStrings.Designer.cs ├── ManifestStrings.resx ├── ManifestUtilities.cs ├── NUglify.Designer.cs ├── NUglify.resx ├── NUglifyApp.csproj ├── Properties └── AssemblyInfo.cs ├── XmlScopeReport.cs └── packages.config /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/.gitmodules -------------------------------------------------------------------------------- /images/nuglify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/images/nuglify.png -------------------------------------------------------------------------------- /src/NUglify.Benchmarks/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tasks/GlobalSuppressions.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify.Tasks/GlobalSuppressions.cs -------------------------------------------------------------------------------- /src/NUglify.Tasks/NUglify.tasks: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/NUglify.Tasks/NUglifyTask.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/Charset.css: -------------------------------------------------------------------------------- 1 | @charset "ISO-8859-1"; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportColor_i.css: -------------------------------------------------------------------------------- 1 | #test{color:red}#test{color:green} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportComment.css: -------------------------------------------------------------------------------- 1 | @import"bar2.css"print and (orientation:landscape) and (color);.foo{background:#fff}.bar{background:#000}.baz{background:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportLevel0Bar2_i.css: -------------------------------------------------------------------------------- 1 | .bar2{background:orange} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportLevel1Bar_i.css: -------------------------------------------------------------------------------- 1 | .bar2{background:orange}.bar{background:green} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportLevel1Baz_i.css: -------------------------------------------------------------------------------- 1 | .bar2{background:orange}.baz{background:yellow} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportLevel2Foo_i.css: -------------------------------------------------------------------------------- 1 | .bar2{background:orange}.bar{background:green}.foo{background:red} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/AtRules/ImportLevel3Foo2_i.css: -------------------------------------------------------------------------------- 1 | .bar2{background:orange}.bar{background:green}.foo{background:red}.foo2{background:black} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug250.css: -------------------------------------------------------------------------------- 1 | @supports(not (-ms-ime-align:auto)) and (not (-moz-appearance:none)){.foo{width:5px}}.this-should-be-class{height:3px} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug270.css: -------------------------------------------------------------------------------- 1 | .selector[attr="value"i]{color:#f00}.selector[attr="value"i]{color:#f00}.selector[attr="value"s]{color:#f00}.selector[attr="value"s]{color:#f00} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug33.css: -------------------------------------------------------------------------------- 1 | p{flex:1 0px;flex:1 0 0px} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug331.css: -------------------------------------------------------------------------------- 1 | .selector{--variable:;color:#f00}.selector2{--variable:} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug412.css: -------------------------------------------------------------------------------- 1 | .foo:has(span span){color:#f00;text-align:center} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug56.css: -------------------------------------------------------------------------------- 1 | @supports(position:sticky){html:not(.windows) body{top:9rem}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Bugs/Bug74.css: -------------------------------------------------------------------------------- 1 | p{height:calc(100vh - 0px);width:0;padding:10px 0 0 0;box-shadow:#000 10px 0;background-position:0% 0;flex:1 0px;flex:1 0 0px;transform:rotateX(0deg);transition-delay:0ms;left:0%} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/Numbers.css: -------------------------------------------------------------------------------- 1 | body{margin:9px,9.8px,0,.9em;height:9.9;width:.5;z-index:.09;font-size:9;top:0;bottom:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/Numbers_n.css: -------------------------------------------------------------------------------- 1 | body{margin:009px,9.8000px,00px,0.9em;height:09.900;width:00.500;z-index:0.090;font-size:09.000;top:000.000px;bottom:0px} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/RGB.css: -------------------------------------------------------------------------------- 1 | body{color:#fff;color:#2aa9ff;color:#fff;color:#6b541f;color:#abc}em{color:#f00}em{color:#00f}em{color:#0f0}em{color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/RGB_f.css: -------------------------------------------------------------------------------- 1 | body{color:rgb(255,255,255);color:rgb(42,169,255);color:rgb(100%,100%,100%);color:rgb(42%,33%,12%);color:rgb(66.7%,73.3%,80%)}em{color:rgb(255,0,0)}em{color:rgb(255,0,0)}em{color:rgb(100%,0%,0%)}em{color:rgb(100%,0%,0%)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/RGB_h.css: -------------------------------------------------------------------------------- 1 | body{color:#fff;color:rgb(/**/42,169,255);color:rgb(100%/**/,100%,100%);color:rgb(42%,33%,12%/**/);color:#abc}em{color:#f00}em{color:#00f}em{color:#0f0}em{color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/StringBreaks.css: -------------------------------------------------------------------------------- 1 | P[example="public class foo{ private int x; foo(int x) { this.x = x; }}"]{color:#f00} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/TermSemis.css: -------------------------------------------------------------------------------- 1 | body{font-size:11px}div{color:#fff}a{background-color:#cba;color:#abc}foo{font-style:italic} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/TermSemis_t.css: -------------------------------------------------------------------------------- 1 | body{font-size:11px;}div{color:#fff;}a{background-color:#cba;color:#abc;}foo{font-style:italic;} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/rgba.css: -------------------------------------------------------------------------------- 1 | body{background-color:#abcd} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Collapse/rrggbb.css: -------------------------------------------------------------------------------- 1 | body{background-color:#abc;background-color:#fff;background-color:#abcdef;background-color:#aaaaab;background-color:#aaaaba;background-color:#aaabaa;background-color:#aabaaa;background-color:#abaaaa;background-color:#baaaaa} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/EmptyComments_nc.css: -------------------------------------------------------------------------------- 1 | div{background:url(all.gif);background:url(1.gif);background:url(2.gif);background:url(3.gif);background:url(4.gif);background:url(5.gif);background:url(6.gif);background:url(7.gif);background:url(8.gif)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromIE5.css: -------------------------------------------------------------------------------- 1 | div{background:url(ie6.gif);background:/**/url(1.gif);background:/**/url(2.gif);background:/**/url(3.gif);background:/**/url(4.gif);background/**/:/**/url(5.gif);background/**/:/**/url(6.gif)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromIE5_nc.css: -------------------------------------------------------------------------------- 1 | div{background:url(ie6.gif);background:url(1.gif);background:url(2.gif);background:url(3.gif);background:url(4.gif);background:url(5.gif);background:url(6.gif)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromIE6.css: -------------------------------------------------------------------------------- 1 | div{background:url(ie6.gif);background /**/:url(1.gif);background /**/:/**/url(2.gif)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromIE6_nc.css: -------------------------------------------------------------------------------- 1 | div{background:url(ie6.gif);background:url(1.gif);background:url(2.gif)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromMacIE.css: -------------------------------------------------------------------------------- 1 | div{background:url(macie.gif)}/* \*/div{background:url(all.gif)}/**/body{margin:0;/* \*/margin:10px;/**/padding:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromMacIE_nc.css: -------------------------------------------------------------------------------- 1 | div{background:url(macie.gif)}div{background:url(all.gif)}body{margin:0;margin:10px;padding:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromNS4.css: -------------------------------------------------------------------------------- 1 | div{background:url(ns4.gif)}/*/*/div{background:url(all.gif)}/**/body{margin:0;/*/*/margin:10px;/**/padding:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/HideFromNS4_nc.css: -------------------------------------------------------------------------------- 1 | div{background:url(ns4.gif)}div{background:url(all.gif)}body{margin:0;margin:10px;padding:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/ImportantComment.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * this is an important comment that we want to keep in the output 3 | */ 4 | body{background:#fff}div{color:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/ImportantCommentHacks.css: -------------------------------------------------------------------------------- 1 | body{/* \*/background-color:#000;/**//*/*//*/background-color: red;/**//*/*/background-color:#00f;/**/background-color /**/:#ff0;background-color:/**/#c0c0c0;background-color/**/:#f0f;/**/color:#f00} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/ImportantComment_All.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * this is an important comment that we want to keep in the output 3 | */ 4 | body{background:#fff}/* but we want this one to go away */div{color:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/ImportantComment_Kill.css: -------------------------------------------------------------------------------- 1 | body{background:#fff}div{color:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/ImportantComment_None.css: -------------------------------------------------------------------------------- 1 | body{background:#fff}div{color:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/OnlyNS4.css: -------------------------------------------------------------------------------- 1 | div{background:url(all.gif)}/*/*//*/div{background:url(ns4.gif)}/**/body{margin:0;/*/*//*/margin:10px;/**/padding:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/OnlyNS4_nc.css: -------------------------------------------------------------------------------- 1 | div{background:url(all.gif)}body{margin:0;padding:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/SingleLine.css: -------------------------------------------------------------------------------- 1 | body{color:#f00} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/TwoImportantComments.css: -------------------------------------------------------------------------------- 1 | body{background-color:#fff} 2 | /*! this is an important comment */ 3 | /*! this is another 4 | important comment */ 5 | a{color:#abcdef} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/CommentHacks/TwoImportantComments_pretty.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-color: #fff 4 | } 5 | /*! this is an important comment */ 6 | /*! this is another 7 | important comment */ 8 | a 9 | { 10 | color: #abcdef 11 | } 12 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Declarations/NoTrailingSemicolon.css: -------------------------------------------------------------------------------- 1 | color:#f00;background-image:url(bkg.jpg);background-color:#000 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Declarations/NoTrailingSemicolon_term.css: -------------------------------------------------------------------------------- 1 | color:red;background-image:url(bkg.jpg);background-color:#000; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Declarations/TrailingSemicolon.css: -------------------------------------------------------------------------------- 1 | color:#f00;background-image:url(bkg.jpg);background-color:#000 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Declarations/TrailingSemicolon_term.css: -------------------------------------------------------------------------------- 1 | color:red;background-image:url(bkg.jpg);background-color:#000; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/EmbeddedAspNetBlock/StringWithBlock.css: -------------------------------------------------------------------------------- 1 | body{background-image:url("../images/<%= Request("bgimg") %>.gif")} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/EmbeddedAspNetBlock/TopLevel.css: -------------------------------------------------------------------------------- 1 | <%= foo %>a{width:10px}<%= foo %> -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Encoding/empty.css: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Encoding/escaped.css: -------------------------------------------------------------------------------- 1 | \4f60 \597d \3e4e4 {background:url(\4f60 \597d .gif);foo:\3e4e4 }br:before{content:"\\\"'\aNO\c ARF\d\1f ARF"}foobar{content:'\7 BEL\'"'} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Encoding/escaped_utf8.css: -------------------------------------------------------------------------------- 1 | 你好𾓤{background:url(你好.gif);foo:𾓤}br:before{content:"\\\"'\aNO\c ARF\d\1f ARF"}foobar{content:'\7 BEL\'"'} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Errors/BadRGB.css: -------------------------------------------------------------------------------- 1 | foo{color:rgb(100%,ralph);background-color:#NotAColor;border-color:foo(#Nope,#neither)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Errors/Exponent.css: -------------------------------------------------------------------------------- 1 | body{padding:2px 1.5e+2cm} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Errors/InvalidClassName.css: -------------------------------------------------------------------------------- 1 | div.900west{background:#f00}div.00bars{background:#008000}div.10-foo{background:#00f}div.1234{background:#f00}div.0000{background:#008000}div.00-foo{background:#00f}div.30_{background:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Errors/UnterminatedString.css: -------------------------------------------------------------------------------- 1 | @media screen{p:before{content:'Hello -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/ColorNames_hex.css: -------------------------------------------------------------------------------- 1 | body{color:#f00;color:#a0522d;color:#0f0;color:#008080;color:#f0f;color:#d2691e;color:#a0522d;color:#808080;color:#f00;color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/ColorNames_major.css: -------------------------------------------------------------------------------- 1 | body{color:red;color:sienna;color:lime;color:teal;color:#f0f;color:#d2691e;color:sienna;color:gray;color:red;color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/ColorNames_noswap.css: -------------------------------------------------------------------------------- 1 | body{color:red;color:sienna;color:lime;color:teal;color:fuchsia;color:chocolate;color:#a0522d;color:#808080;color:#f00;color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/ColorNames_strict.css: -------------------------------------------------------------------------------- 1 | body{color:red;color:#a0522d;color:lime;color:teal;color:#f0f;color:#d2691e;color:#a0522d;color:gray;color:red;color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/CssReplacementTokens.css: -------------------------------------------------------------------------------- 1 | body{font-family:%FontFace:font%;font-size:%Font_Size%;color:%FontColor:%} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/MajorColors.css: -------------------------------------------------------------------------------- 1 | body{color:coral;background:tan} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/MajorColors_strict.css: -------------------------------------------------------------------------------- 1 | body{color:#ff7f50;background:#d2b48c} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/StringReplacement.css: -------------------------------------------------------------------------------- 1 | body{color=white;prop=func(arg=null)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Replacements/ValueReplacement.css: -------------------------------------------------------------------------------- 1 | div.class1{background-color:#f90;color:white}div.class2{background-color:#ffc;/*[TextColor2]*/color:#000} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/Attribute.css: -------------------------------------------------------------------------------- 1 | H1[title]{color:#00f}SPAN[class=example]{color:#00f}SPAN[hello="Cleveland"][goodbye="Columbus"]{color:#00f}A[rel~="copyright"]{color:#f00}DIV[LANG|="en"]{color:#f00}A[rel^="http://"]{color:#ff0}A[title$=foo]{color:#ff0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/Escapes.css: -------------------------------------------------------------------------------- 1 | .foo\.bar{bar:foo} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/Grouping.css: -------------------------------------------------------------------------------- 1 | H1,H2,H3{font-family:sans-serif}h1 span>b,h1.hilite span,h1+h2 ul{font-weight:bold} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/MatchCasing.css: -------------------------------------------------------------------------------- 1 | .ursuper{color:#0ff}.ur{cursor:hand}.urlinator{text-decoration:underline} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/Namespace.css: -------------------------------------------------------------------------------- 1 | foo|h1{color:blue}foo|*{color:#ff0}|h1{color:red}*|h1{color:green} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/NoSpaceUniversal.css: -------------------------------------------------------------------------------- 1 | body*h2{color:#fff;background-color:#ff6347} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/Not.css: -------------------------------------------------------------------------------- 1 | html:not([dummy]) #msve_ScratchPad .collectionList ul li .toolReorderUp:hover{background-image:url("../../../../i/bin/##version##/icn_reorderup_hover.gif")} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/PseudoFunctions.css: -------------------------------------------------------------------------------- 1 | a:has(>.b+c){display:block}a:is(.b){display:block}a:where(.b){display:block}a:nth-child(4n){color:#0f0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Selectors/Universal.css: -------------------------------------------------------------------------------- 1 | * html div{color:#f0f}*{color:#00f}div *>li{list-style:none}li+*{list-style-position:inside} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Switches/EchoInput.css: -------------------------------------------------------------------------------- 1 | /* this is regular comment */ 2 | body 3 | { 4 | 5 | background-color: /* red? */ #f00; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/AlphaHash.css: -------------------------------------------------------------------------------- 1 | button{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#30ffffff,endColorstr=#10000000) progid:DXImageTransform.Microsoft.Shadow(color=#000000,direction=135,strength=2)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/CDO.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/Expr.css: -------------------------------------------------------------------------------- 1 | #weather{position:absolute;left:expression(415);height:40px;width:138px;overflow:hidden;color:#00f;padding:0 0 4px 0;width:expression(document.body.clientWidth>800?"800px":"auto");zoom:expression(this.foo=1,this.bar=2)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/Expression.css: -------------------------------------------------------------------------------- 1 | a{font:italic 12pt/1.4em Arial,SanSerif;font:italic 12pt/1.4em Arial,SanSerif;weight:foo(22/7,14em,"args");margin:U+98;foo:U+98??-123456} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/FontNames.css: -------------------------------------------------------------------------------- 1 | body{font-family:Arial (Hebrew),Arial (Cyrillic),Times New Roman,Arial,Helvetica,Sans-Serif} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/Function.css: -------------------------------------------------------------------------------- 1 | body{color:red;foo:bar(one,two,three);filter:progid:Foo.Bar.Git(params=12,bar=110);filter:alpha(opacity=25);filter:alpha(opacity=30);filter:mask();background-image:-webkit-radial-gradient(circle,white,black)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/Function_f.css: -------------------------------------------------------------------------------- 1 | body{color:rgb(255,0,0);foo:bar(one,two,three);filter:progid:Foo.Bar.Git(params=12,bar=110);filter:alpha(opacity=25);filter:alpha(opacity=30);filter:mask();background-image:-webkit-radial-gradient(circle,white,black)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/Important.css: -------------------------------------------------------------------------------- 1 | body div{color:#f00}ul div{color:#f0f!important}tr div{font-weight:bold!important;background:#0ff}ol{color:#00f!important} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/PointZeroEms.css: -------------------------------------------------------------------------------- 1 | body{padding:0;line-height:0;margin:0;foobar:0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/RgbWithSpace.css: -------------------------------------------------------------------------------- 1 | a{color:#030507;color:#64befa;color:rgb(100 190 250/40%);color:rgb(100,190,250,.4)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Syntax/Strings.css: -------------------------------------------------------------------------------- 1 | a[title="foo"],a[title='bar'],a[title="f\"oo\""],a[title='f\'oo\'']{color:#fff}a[title="f\"oo\""],a[title='f\'oo\'']{color:#f00}div:after{content:"\a";white-space:pre} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Values/Attr.css: -------------------------------------------------------------------------------- 1 | img{height:attr(height,px,auto);width:attr(width,px,auto);margin:attr(length em);padding:attr(fooattr px,0);color:attr(clr)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Values/Cycle.css: -------------------------------------------------------------------------------- 1 | em{font-style:cycle(italic,normal)}ul{list-style-type:disk}li>ul{list-style-type:cycle(disk,circle,square,box)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Values/Grids.css: -------------------------------------------------------------------------------- 1 | #grid{width:500px;grid-columns:"a" auto "b" minmax(min-content,1fr) "b" "c" "d" ("e" 40px)[2] (auto)[5];grid-template-columns:[first-column] 15% [second-column] 10% [third-column] auto} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Values/Toggle.css: -------------------------------------------------------------------------------- 1 | ul{list-style-type:disc}ul ul{list-style-type:toggle(disc,circle,square,box)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Expected/Values/Zeros.css: -------------------------------------------------------------------------------- 1 | .foo{animation:.5s cubic-bezier(.5,0,.5,1) 0s alternate none 2 logoAnim} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/Charset.css: -------------------------------------------------------------------------------- 1 | @charset "ISO-8859-1"; 2 | 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/ImportColor.css: -------------------------------------------------------------------------------- 1 | @import "red.css"; 2 | @import "green.css"; 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/ImportLevel0Bar2.css: -------------------------------------------------------------------------------- 1 | .bar2 { background: orange; } 2 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/ImportLevel1Bar.css: -------------------------------------------------------------------------------- 1 | @import url(ImportLevel0Bar2.css); 2 | .bar { background: green; } 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/ImportLevel1Baz.css: -------------------------------------------------------------------------------- 1 | @import "ImportLevel0Bar2.css"; 2 | .baz { background: yellow; } 3 | 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/ImportLevel2Foo.css: -------------------------------------------------------------------------------- 1 | @import "ImportLevel1Bar.css"; 2 | .foo { background: red; } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/ImportLevel3Foo2.css: -------------------------------------------------------------------------------- 1 | @import url(ImportLevel2Foo.css); 2 | 3 | .foo2 { background:black; } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/green.css: -------------------------------------------------------------------------------- 1 | #test {color: green} 2 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/AtRules/red.css: -------------------------------------------------------------------------------- 1 | #test {color: red} 2 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Bugs/Bug250.css: -------------------------------------------------------------------------------- 1 | @supports (not (-ms-ime-align: auto)) and (not (-moz-appearance: none)) { 2 | .foo { 3 | width: 5px; 4 | } 5 | } 6 | 7 | .this-should-be-class { 8 | height: 3px; 9 | } 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Bugs/Bug33.css: -------------------------------------------------------------------------------- 1 | p { 2 | flex: 1 0px; 3 | flex: 1 0 0px; 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Bugs/Bug331.css: -------------------------------------------------------------------------------- 1 | .selector { 2 | --variable: ; 3 | color: red; 4 | } 5 | .selector2 { 6 | --variable:; 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Bugs/Bug412.css: -------------------------------------------------------------------------------- 1 | .foo:has(span span) { 2 | color: #f00; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Bugs/Bug56.css: -------------------------------------------------------------------------------- 1 | @supports (position: sticky) { 2 | html:not(.windows) body { 3 | top: 9rem; 4 | } 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Collapse/StringBreaks.css: -------------------------------------------------------------------------------- 1 | P[example="public class foo\ 2 | {\ 3 | private int x;\ 4 | \ 5 | foo(int x) {\ 6 | this.x = x;\ 7 | }\ 8 | \ 9 | }"] { color: red } 10 | 11 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Collapse/rgba.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-color: #abcd; 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/CommentHacks/ImportantComment.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * this is an important comment that we want to keep in the output 3 | */ 4 | body{background:white;} 5 | /* but we want this one to go away */ 6 | div{color:black;} 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Declarations/NoTrailingSemicolon.css: -------------------------------------------------------------------------------- 1 | color: #ff0000; background-image: url(bkg.jpg); background-color: black -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Declarations/TrailingSemicolon.css: -------------------------------------------------------------------------------- 1 | color: #ff0000; background-image: url(bkg.jpg); background-color: black; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/EmbeddedAspNetBlock/StringWithBlock.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | /* the url string contains an ASP.NET block that contains delimiter characters */ 4 | background-image: url("../images/<%= Request("bgimg") %>.gif"); 5 | } 6 | 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/EmbeddedAspNetBlock/TopLevel.css: -------------------------------------------------------------------------------- 1 | <%= foo %> 2 | a { width: 10px; } 3 | <%= foo %> -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Encoding/empty.css: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Errors/BadRGB.css: -------------------------------------------------------------------------------- 1 | foo 2 | { 3 | color: rgb(100%,ralph); 4 | background-color: #NotAColor; 5 | border-color: foo(#Nope /* bad color */, #neither/* another bad color */); 6 | } 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Errors/Exponent.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | /* don't actually have exponent syntax in CSS */ 4 | padding: 2px 1.5e+2cm; 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Errors/UnterminatedString.css: -------------------------------------------------------------------------------- 1 | @media screen { 2 | p:before { content: 'Hello -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Replacements/CssReplacementTokens.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | font-family: %FontFace:font%; 4 | font-size: %Font_Size%; 5 | color: %FontColor:%; 6 | } 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Replacements/MajorColors.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | color: #FF7F50; 4 | background: #d2b48c; 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Replacements/StringReplacement.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | DELETEME 4 | 5 | CLR=white; 6 | prop=func(param=value); 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Selectors/Escapes.css: -------------------------------------------------------------------------------- 1 | /* the period is escaped so it's part of the identifier, not a class operator */ 2 | .foo\.bar 3 | { 4 | bar:foo; 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Selectors/Grouping.css: -------------------------------------------------------------------------------- 1 | H1, 2 | H2, H3 3 | { 4 | font-family: sans-serif; 5 | } 6 | 7 | h1 span>b, h1.hilite span, 8 | h1+h2 ul 9 | { 10 | font-weight: bold; 11 | } 12 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Selectors/Namespace.css: -------------------------------------------------------------------------------- 1 | foo|h1 { color: blue } /* first rule */ 2 | foo|* { color: yellow } /* second rule */ 3 | |h1 { color: red } /* ...*/ 4 | *|h1 { color: green } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Selectors/Not.css: -------------------------------------------------------------------------------- 1 | html:not([dummy]) #msve_ScratchPad .collectionList ul li .toolReorderUp:hover 2 | { 3 | background-image: url("../../../../i/bin/##version##/icn_reorderup_hover.gif"); 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Selectors/PseudoFunctions.css: -------------------------------------------------------------------------------- 1 | a:has(> .b + c) 2 | { 3 | display: block; 4 | } 5 | 6 | a:is(.b) { 7 | display: block; 8 | } 9 | 10 | a:where(.b) { 11 | display: block; 12 | } 13 | 14 | 15 | a:nth-child(4n) { 16 | color: lime; 17 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Selectors/Universal.css: -------------------------------------------------------------------------------- 1 | * html div 2 | { 3 | color: #f0f; 4 | } 5 | * 6 | { 7 | color: Blue; 8 | } 9 | div *>li 10 | { 11 | list-style: none; 12 | } 13 | li+* 14 | { 15 | list-style-position: inside; 16 | } 17 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Switches/EchoInput.css: -------------------------------------------------------------------------------- 1 | /* this is regular comment */ 2 | body 3 | { 4 | 5 | background-color: /* red? */ #f00; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Syntax/CDO.css: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Syntax/PointZeroEms.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | padding: .0em; 4 | line-height: .000000pt; 5 | margin: 000.0000ex; 6 | foobar: 0000000 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Values/Attr.css: -------------------------------------------------------------------------------- 1 | img { 2 | height: attr(height, px, auto); 3 | width: attr(width, px, auto); 4 | 5 | margin: attr(length em); 6 | padding: attr(fooattr px, 0); 7 | color: attr(clr); 8 | } 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Values/Grids.css: -------------------------------------------------------------------------------- 1 | #grid { 2 | width: 500px; 3 | grid-columns: "a" auto "b" minmax(min-content, 1fr) "b" "c" "d" ("e" 40px)[2] (auto)[5]; 4 | grid-template-columns: [ first-column ] 15% [second-column ] 10% [ third-column] auto; 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Values/Toggle.css: -------------------------------------------------------------------------------- 1 | ul 2 | { 3 | list-style-type: disc; 4 | } 5 | ul ul 6 | { 7 | list-style-type: toggle(disc, circle, square, box); 8 | } 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/CSS/Input/Values/Zeros.css: -------------------------------------------------------------------------------- 1 | .foo 2 | { 3 | animation: 0.5s cubic-bezier(0.5, 0, 0.5, 1) 0s alternate none 2 logoAnim; 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Expected/ManifestTask/test_resx.js: -------------------------------------------------------------------------------- 1 | (function(n){n.alert("ʻO Kona kai ʻōpua i ka laʻi\nʻO pua hīnano i ka mālie")})(window) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Expected/NUglifyTask/test1.min.css: -------------------------------------------------------------------------------- 1 | body{color:#fff;color:#2aa9ff;color:#fff;color:#6b541f;color:#abc}em{color:#f00}em{color:#00f}em{color:#0f0}em{color:#f0f} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Expected/NUglifyTask/test2.min.css: -------------------------------------------------------------------------------- 1 | H1[title]{color:#00f}SPAN[class=example]{color:#00f}SPAN[hello="Cleveland"][goodbye="Columbus"]{color:#00f}A[rel~="copyright"]{color:#f00}DIV[LANG|="en"]{color:#f00}A[rel^="http://"]{color:#ff0}A[title$=foo]{color:#ff0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/CssEncoding/empty.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify.Tests/TestData/Core/Input/CssEncoding/empty.css -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/CssEncoding/utf16.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify.Tests/TestData/Core/Input/CssEncoding/utf16.css -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/CssEncoding/utf8ascii.css: -------------------------------------------------------------------------------- 1 | @charset "ascii"; 2 | body 3 | { 4 | background: url("\4f60 \597d .gif"); 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/CssEncoding/utf8none.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background: url("你好.gif"); 4 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/CssEncoding/utf8utf8.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | body 3 | { 4 | background: url("你好.gif"); 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/HasError.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | 42; 4 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/HasError.js: -------------------------------------------------------------------------------- 1 | for(ndx = 0) 2 | { 3 | if (false { 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/ManifestNoWarn.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -w:0 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/ManifestWarn.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/Manifest_resx.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/WithWarnings.js: -------------------------------------------------------------------------------- 1 | // unised parameters 2 | function foo(a, b, c) 3 | { 4 | // unused variable 5 | var d; 6 | 7 | // undefined variable reference 8 | return a + B; 9 | } 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/external.min.js: -------------------------------------------------------------------------------- 1 | /*! important external comment */ 2 | (function(a){if(a)a.alert('external')})(window) 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/file1.css: -------------------------------------------------------------------------------- 1 | .foo:nth-child(n+1) 2 | { 3 | border-left: 25.0px dashed lightgray; 4 | } 5 | .bar:nth-child(n+1 of .test) { 6 | background-color: #ff0000; 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/file1.js: -------------------------------------------------------------------------------- 1 | (function(window, document, undefined) 2 | { 3 | // start of our closure 4 | ///#IF DEBUG 5 | if (window.console) 6 | { 7 | console.log("entering closure"); 8 | } 9 | ///#END 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/file2.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | color: aquamarine; 4 | background-color: ivory; 5 | margin: 0px 0in 0cm 0pt; 6 | padding: 1.00cm 2.0e+2px; 7 | } 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/file4.js: -------------------------------------------------------------------------------- 1 |  // end of our closure 2 | })(window, document) 3 | // a single-line comment that ends in the EOF -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/file5.js: -------------------------------------------------------------------------------- 1 | (function($) 2 | { 3 | // say hi when loaded 4 | $(function(){alert("hi!")}) 5 | })(jQuery) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/ManifestTask/file_resx.js: -------------------------------------------------------------------------------- 1 | (function(window) 2 | { 3 | window.alert(Lyrics.FirstLine + "\n" + Lyrics.SecondLine); 4 | })(window); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/NUglifyTask/Fail.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | 42 4 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/NUglifyTask/Fail.js: -------------------------------------------------------------------------------- 1 | while{ 2 | alert(; 3 | } 4 | 5 | /* unterminated comment -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/Core/Input/Preprocessor/SourceDirective.js: -------------------------------------------------------------------------------- 1 | /*/#source 10 1 foo.js 2 | this is the source directive */ 3 | 4 | 5 | foo(bar); 6 | 7 | ///#SoUrCe 5 42 fargo.htm 8 | bar(foo) 9 | 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/HTML/tidy-html5-tests/html5/html4/frame_a.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Frame A

4 |

Note: The frameset, frame, and noframes elements are not supported in HTML5.

5 | 6 | 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/HTML/tidy-html5-tests/html5/html4/frame_b.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Frame B

4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/HTML/tidy-html5-tests/html5/html4/frame_c.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Frame C

4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/HTML/tidy-html5-tests/html5/min.org.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Minimum HTML5 document 6 | 7 | 8 | Content of the document...... 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ArrayHandling/Length.js: -------------------------------------------------------------------------------- 1 | function yes1(){return 5}function yes2(){return 5}function yes3(){return 7}function no1(){return[1,2,3,,].length}function no2(){return[1,2,...[3,...4,5],6].length} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ArrayHandling/Reverse.js: -------------------------------------------------------------------------------- 1 | function Func(){var a;return a=[0,1,2,3,4],a.reverse()} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ArrayHandling/Sort.js: -------------------------------------------------------------------------------- 1 | function Func(){var a;return a=["X","y","d","Z","v","m","r"],a.sort()} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ArrayHandling/Spread.js: -------------------------------------------------------------------------------- 1 | function test1(a,b,c){return[...b,c,...a]} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AspNet/Blocks.js: -------------------------------------------------------------------------------- 1 | <% sdfasdfasd %>;<% sdgsdfgdfgdfg %>ident+=10 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AspNet/Expressions.js: -------------------------------------------------------------------------------- 1 | var ident=<%= Request("arf") %>+(foo*<%= foo %>+10) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AspNet/Identifiers.js: -------------------------------------------------------------------------------- 1 | function <%= prefix %>Root<%= suffix %>(foo){alert(foo)}function bar<%= this.ID %>(arf){return arf+<%= this.Arf %>} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Assignments/Assign.js: -------------------------------------------------------------------------------- 1 | function Func(p1){var _a=1+p1,$b=2,\u4f60\u597d=5;return \u4f60\u597d+=18,a+$b*$b+3+4} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Assignments/AssignAspNetBlock.js: -------------------------------------------------------------------------------- 1 | function Func(){var x=<%= test %>;Func(x)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Assignments/Assign_utf8.js: -------------------------------------------------------------------------------- 1 | function Func(p1){var _a=1+p1,$b=2,你好=5;return 你好+=18,a+$b*$b+3+4} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Assignments/CompoundAssign.js: -------------------------------------------------------------------------------- 1 | function Func(){var a=a+1,b=b&1,c=c|1,d=d^1,e=e/1,f=f<<1,g=g%1,h=h*1,i=i>>1,j=j-1,k=k>>>1,l=l&&1,m=m||1;a+=1;a++;b&=1;c|=1;d^=1;e/=1;f<<=1;g%=1;h*=1;i>>=1;j-=1;j--;k>>>=1} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Assignments/MultiVars.js: -------------------------------------------------------------------------------- 1 | var a="a",b="b",c,d="d",e,f,g;d&&(e="e");f="f";g="g" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Assignments/PlusAssignReturn.js: -------------------------------------------------------------------------------- 1 | function test1(arg){var temp=arg;return temp+""}function test2(arg){var temp=arg;return temp+="foo",temp+"bar"}function test3(arg){var temp=arg;return temp+="foo",temp+=n,temp+"bar"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/ConstantIf.js: -------------------------------------------------------------------------------- 1 | if(1)throw"true";if(0)throw"false";/*@cc_on@if(1)@*/alert("true");/*@elif(0)@*/alert("elif");/*@else@*/alert("false");/*@end@*/ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/EvalLength.js: -------------------------------------------------------------------------------- 1 | function yes1(){return 9}function yes2(){return 6}function no1(){return"1\v2\v3".length} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/ExpressionIf.js: -------------------------------------------------------------------------------- 1 | function foo(a,b){var bar,p;if(a(b)&&(b="foo"),b!==null){bar="";for(p in b)bar+=p+b[p];return bar}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/LiteralOverflows.js: -------------------------------------------------------------------------------- 1 | var smallNum=2e-200,largeNum=2e200,a=smallNum*2e300*2e200,b=largeNum*2e-100/2e300 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/LiteralsFarToLeft.js: -------------------------------------------------------------------------------- 1 | var a,b,c,d;a=5+a+20;b=25-a;c=5+a-20;d=-15-a;a=100*a;a=100*a;a=100*a;a=100*a;b=100/a;b=100/a;b=100/a;b=100/a;c=a/4;c=a/4;c=a/4;c=a/4;d=5/a/20;d=5/a/20;d=5/a/20;d=5/a/20;a=4/a;b=4*a;c=100/a -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/LiteralsToLeft.js: -------------------------------------------------------------------------------- 1 | var a,b,c,d;a=a+"foobar";b=a+"foo10";c=a+5+20;d=a+5-20;a=a- -15;b=a-25;c=a*100;c=a*100;c=a*100;c=a*100;d=a/4;d=a/4;d=a/4;d=a/4;a=a*4;a=a*4;a=a*4;a=a*4;b=a/100;b=a/100;b=a/100;b=a/100;c=a*4;d=a/4;a=a/100;b=a|31;c=a&3;d=a^12 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/NegShortcutIf.js: -------------------------------------------------------------------------------- 1 | var a,b,c,d;a&&b();a||b();a||b();a&&b();a;b&&c();a;b||c();a;b&&c();a;b||c();!a&&b()&&c();(!a||b())&&c();(d,!a&&b())&&c();(d,!a||b())&&c() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/NestedIf.js: -------------------------------------------------------------------------------- 1 | function foo(a,b){return a!==null&&typeof b=="string"?a+b:""} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/ReturnAssignOp.js: -------------------------------------------------------------------------------- 1 | function foo(cond){var text="START ";return text+=cond?"TRUE":"FALSE",text+" END"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/SimplifyStrToNum.js: -------------------------------------------------------------------------------- 1 | var a="1234",b=a+5,c=+a+5,d=5+ +a,e=5+a,f=5+ +a -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/SimplifyStrToNum_noeval.js: -------------------------------------------------------------------------------- 1 | var a="1234",b=a+5,c=+a+5,d=5+ +a,e=5+a,f=5+(a-(5-5)) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/StrictToRegular.js: -------------------------------------------------------------------------------- 1 | function test(){var a="foo"=="bar",b="foo"!="bar",c=typeof test=="function",d=typeof test!="undefined",e=!1,f=!0,g=!1,h=!0} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/VerticalTab.js: -------------------------------------------------------------------------------- 1 | var IE="\v"=="v",ie=!+"\v1" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/amd.js: -------------------------------------------------------------------------------- 1 | define("foo",["ralph"],function(ralph){alert(ralph)});var x=42;define("bar",function(){return{one:"two"}});define("foo",["bar"],function(bar){alert(bar.one)}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/amd_amd.js: -------------------------------------------------------------------------------- 1 | var x=42;define("bar",function(){return{one:"two"}});define("foo",["bar"],function(bar){alert(bar.one)}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/AstMods/opAssignCombine.js: -------------------------------------------------------------------------------- 1 | function test1(arg){foo=arg;foo+=foo.indexOf("?")}function test2(arg){var foo=arg;foo+=(foo.indexOf("#")>=0?"":"#")+"fix"}function test3(arg){var foo=arg;foo+="bar";foo+=foo.indexOf("?");foo+="bat"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/AfterReturn.js: -------------------------------------------------------------------------------- 1 | function test(a,b){function foo(p){return"FOO"+p}var d=foo(c),c;return a+b+d} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/AfterReturn_noreloc.js: -------------------------------------------------------------------------------- 1 | function test(a,b){var d=foo(c);return a+b+d;var c;function foo(p){return"FOO"+p}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/AspNetBlock.js: -------------------------------------------------------------------------------- 1 | function foo(){var x;<%= test %>;return bar(x)}function bar(){var x;<%= test %>return x} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/DirectivePrologue.js: -------------------------------------------------------------------------------- 1 | function one(a,b){"use strict";return a=b+b,b+a}function two(c,d){"some other prologue";"use strict";return d+c+d}function three(e,f){"use strict";var d=e+f;return d} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/ExprReturn.js: -------------------------------------------------------------------------------- 1 | function test1(a,b){return a(b)}function test2(a,b,c){return a.foo.bar=b+c,a.foo.bar}function test3(a,b,c){return a[b+c]=a+b+c,a[b+c]}function test4(a,b,c){function foo(a,b){return c=a+b}return foo(a,b)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/IfReturnReturn.js: -------------------------------------------------------------------------------- 1 | function test1(a){if(a!=0){a==20;return}a==="foo"}function test2(a,b){function foo(a,b){return typeof a==typeof b}return foo(a,b),a+b} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/KillIfReturn.js: -------------------------------------------------------------------------------- 1 | function foo(a,b){if(a)return b?void 0:false} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/ReturnLiteral.js: -------------------------------------------------------------------------------- 1 | function test1(a){return{x:a+1,y:a-1}}function test2(a){return{a}}function test3(a){return delete a.x,a} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/ReturnVoid.js: -------------------------------------------------------------------------------- 1 | function test1(a,b){if(ab)return a==0?void 0:a-b;var c=b;if(!(c instanceof String))return a} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/BlockOpts/VarAssign.js: -------------------------------------------------------------------------------- 1 | function foo(ndx){var a=10+ndx;switch(ndx){case 1:ndx+=42;default:ndx*=2}return ndx+a} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Booleans/Boolean.js: -------------------------------------------------------------------------------- 1 | function Func(){var boolObj1=new Boolean(0),boolObj2=new Boolean(1),boolObj3=new Boolean(!0),boolObj4=new Boolean(null),boolObj5=new Boolean("NaN")} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug120.js: -------------------------------------------------------------------------------- 1 | var o={};Object.defineProperty(o,"a",{get(){return"foobar world"}});Object.defineProperty(o,"b",{set(x){this.lol=x}}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug138.js: -------------------------------------------------------------------------------- 1 | const o={async testSub(){return 1}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug139.js: -------------------------------------------------------------------------------- 1 | const testString={js:{createClass(className="MyClass"){let output=` 2 | class ${className} { 3 | test() { 4 | `;output+=`} async init(){ console.log("Class loaded.."); } } `}}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug156.js: -------------------------------------------------------------------------------- 1 | a?.b;let x=a?.b -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug159.js: -------------------------------------------------------------------------------- 1 | if(x){const n=x}while(y){let n=y} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug160.js: -------------------------------------------------------------------------------- 1 | let x=n=>!n.a&&n.b==c -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug163.js: -------------------------------------------------------------------------------- 1 | import("some.js");var x=await import("some.js") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug197.js: -------------------------------------------------------------------------------- 1 | var obj = { 2 | one: 1, 3 | primitiveArray: [1, 2, 3], 4 | objArray: [ 5 | { one: 1 }, 6 | { two: 2 } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug199JS.js: -------------------------------------------------------------------------------- 1 | let x={"\\foo":"\tbar\\\nlol"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug199JSON.json: -------------------------------------------------------------------------------- 1 | {"\\foo":"\tbar\\\nlol"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug200.js: -------------------------------------------------------------------------------- 1 | const obj=function(){return{bar:"4567",dummy:"1234"}}() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug201.js: -------------------------------------------------------------------------------- 1 | const sum=function({foo:t=2,dummy:n=3}){return t+n},sum2=({foo2:t=2,dummy2:n=3})=>t+n -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug204.js: -------------------------------------------------------------------------------- 1 | function func(n,t){return{[n.name]:t}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug205.js: -------------------------------------------------------------------------------- 1 | function test(n,t){return{amethod(){return this},get[n+t](){},set[n+t](value){},*[n+t](i){return i},async[n+t](i){return i},async*[n+t](i){return i}}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug214.js: -------------------------------------------------------------------------------- 1 | export class MyClass{set property(_value){}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug215.js: -------------------------------------------------------------------------------- 1 | export class Loader{set(n,t,i){alert(n+t+i)}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug216.js: -------------------------------------------------------------------------------- 1 | function test(){const n=new Map;for(const[t,i]of n)alert(t+i)}test() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug241.js: -------------------------------------------------------------------------------- 1 | function foo(){return 1}function of(){return foo()} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug253.js: -------------------------------------------------------------------------------- 1 | function testInInline(){for(const i in["foo"])console.log(i)}function testOfInline(){for(const i of["foo"])console.log(i)}function testIn(){let i;for(i in["foo"])console.log(i)}function testOf(){let i;for(i of["foo"])console.log(i)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug264.js: -------------------------------------------------------------------------------- 1 | "use strict";const SomeClass={method1(){},method2(){}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug266.js: -------------------------------------------------------------------------------- 1 | var a={set(n,t,i){return n+t+i}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug279.js: -------------------------------------------------------------------------------- 1 | "use strict";const config={...Manipulator.getDataAttributes(target),...Manipulator.getDataAttributes(this),...!1,...!1} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug284.js: -------------------------------------------------------------------------------- 1 | lambda(container);console.log(1) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug285.js: -------------------------------------------------------------------------------- 1 | fff=function(){if(1){let n=1;try{}catch(t){return n+t}}};ggg=function(){if(1){let t=1;try{}catch(n){let i=t+n;try{}catch(n){return i+n}}}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug290.js: -------------------------------------------------------------------------------- 1 | let foo,bar;({foo,bar}={foo:42,bar:!0}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug293.js: -------------------------------------------------------------------------------- 1 | async function myfunc(){return await myfunc()==="value"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug298.js: -------------------------------------------------------------------------------- 1 | class n{constructor(){const n=new.target.prototype}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug300.js: -------------------------------------------------------------------------------- 1 | function test(n){return __awaiter(this,void 0,void 0,function*(){let t=!0;for(let i=1;i<=5;i++)if(!(yield isOk(n*i))){t=!1;break}return t})} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug301.js: -------------------------------------------------------------------------------- 1 | let x=1;p!=null&&(yield isOk(p))!=null&&(x=2) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug305.js: -------------------------------------------------------------------------------- 1 | let x=String.raw`foo` -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug306.json: -------------------------------------------------------------------------------- 1 | {"@context":"http://schema.org/","@type":"WebSite","url":"https://domain.ext","name":"Name Site","isChecked":true,"alternateName":null} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug345.js: -------------------------------------------------------------------------------- 1 | "use strict";function test1({verylongname_x:n=1,verylongname_y:t=2}={}){console.log(n+t)}function test2(n=1,t=2){console.log(n+t)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug35.js: -------------------------------------------------------------------------------- 1 | var a=!0,b=!1,x;(!a||b)&&console.log(1);x=!a||b -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug353.js: -------------------------------------------------------------------------------- 1 | class HttpClient{delete(n,t){return this.send({...t,method:"DELETE",url:n})}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug360.js: -------------------------------------------------------------------------------- 1 | export async function fooAsync(){} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug375.js: -------------------------------------------------------------------------------- 1 | function func(){var n;n={};n.data="text";n.data2=5} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug391.js: -------------------------------------------------------------------------------- 1 | function func(){return{...{arrow:()=>{},anonymous:function(){},named:function(){}}}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug394.js: -------------------------------------------------------------------------------- 1 | const someFunc=({val:t,op:n="eq"})=>{var i=n+t};var args={val:"va",op:"contains"};someFunc(args) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug403.js: -------------------------------------------------------------------------------- 1 | class ClassWithJsKeywords{import(n){return n}export(n){return n}with(n){return n+5}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug429.js: -------------------------------------------------------------------------------- 1 | const test=await import("lib/math");console.log(test.pi),(import.meta)!==undefined&&(console.log(`imported url ${(import.meta).url}`),console.log(`resolved path ${(import.meta).resolve(test.pi)}`)) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug57.js: -------------------------------------------------------------------------------- 1 | var a;a!=null&&(yield 1) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug63.js: -------------------------------------------------------------------------------- 1 | switch(=1){}"1" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug70.js: -------------------------------------------------------------------------------- 1 | var x="hello world",y=`Hello 2 | world` -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug76.js: -------------------------------------------------------------------------------- 1 | function x(n){let t=c(d);if(t==="e")return t;else{let t=this.e(n);var i=this.g([t]);return t+i}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug78.js: -------------------------------------------------------------------------------- 1 | var reg=/[^]/ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug79.js: -------------------------------------------------------------------------------- 1 | function go(n){for(let t in n)console.log(t)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug80.js: -------------------------------------------------------------------------------- 1 | var o={a:function(async){async=()=>1;async[1]=2}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug87.js: -------------------------------------------------------------------------------- 1 | function test(){this.prueba=prueba2;function prueba2(){alert("hola")}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug92.js: -------------------------------------------------------------------------------- 1 | var x=async()=>0;Promise.then(async()=>0) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug94.js: -------------------------------------------------------------------------------- 1 | function test(module){function x(module){module.bar="baz"}module.exports=function(){};module.foo=x(module)}const test="1" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/Ambiguous.js: -------------------------------------------------------------------------------- 1 | (function(){var err,bar=12;bar*=(bar+13)%bar;try{alert(foo)}catch(err){}alert(err)})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/Ambiguous_h.js: -------------------------------------------------------------------------------- 1 | (function(){var t,n=12;n*=(n+13)%n;try{alert(foo)}catch(t){}alert(t)})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/Collision.js: -------------------------------------------------------------------------------- 1 | +function(n){+function(t,i){try{t+=i;function r(t){alert(t+n)}r("e: ")}catch(n){alert(n)}}(10,20)}(10) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/ForInLet.js: -------------------------------------------------------------------------------- 1 | function go(scope){for(let test in scope.prop)console.log(test)}go({prop:[1,2,3]}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/ForInLet_h.js: -------------------------------------------------------------------------------- 1 | function go(n){for(let t in n.prop)console.log(t)}go({prop:[1,2,3]}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/NoOuter.js: -------------------------------------------------------------------------------- 1 | (function(){var bar=12;bar*=(bar+13)%bar;try{alert(foo)}catch(err){alert(err)}})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/NoOuter_h.js: -------------------------------------------------------------------------------- 1 | (function(){var n=12;n*=(n+13)%n;try{alert(foo)}catch(t){alert(t)}})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/OuterIsGlobal.js: -------------------------------------------------------------------------------- 1 | var err;try{alert(foo)}catch(err){}alert(err) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/OuterNotRef.js: -------------------------------------------------------------------------------- 1 | (function(){var bar=12;bar*=(bar+13)%bar;try{alert(foo)}catch(err){}})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CatchVariable/OuterNotRef_h.js: -------------------------------------------------------------------------------- 1 | (function(){var n=12;n*=(n+13)%n;try{alert(foo)}catch(t){}})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Classes/ClassDecl.js: -------------------------------------------------------------------------------- 1 | class Foo{constructor(){this.foo=42}get foo(){return this.foo}set foo(n){this.foo=n}}class Bar extends Foo{Bat(n,t){alert(n+t)}*Iter(){this.bat&&(yield this.bat);yield super.foo}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Classes/ClassErrors.js: -------------------------------------------------------------------------------- 1 | class extends String{construtor(){}}class[foo,bar]extends Array{method(){return 42}}class foo extends{get bar(){return 42}}{}class bar{*Iter(n){for(var t of n)yield t}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Classes/ClassNormalAndStaticProperty.js: -------------------------------------------------------------------------------- 1 | class Foo{static get bar(){return""}get bar(){return Foo.bar()}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/EventHandler.js: -------------------------------------------------------------------------------- 1 | var n=42+event.x;return alert(n),event.preventDefault(),!1 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/Expression.js: -------------------------------------------------------------------------------- 1 | [1,foo+=bar?function(n){return n.location.href}(window):{loc:"none"}] -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/Expression_json.json: -------------------------------------------------------------------------------- 1 | [1,] -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/Expression_prog.js: -------------------------------------------------------------------------------- 1 | [1,foo+=bar?function(n){return n.location.href}(window):{loc:"none"}];alert("great googley-moogley!") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/Globals.js: -------------------------------------------------------------------------------- 1 | function ack(){foobar(foo,bar)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/TermSemi1.js: -------------------------------------------------------------------------------- 1 | var r=100;r=r+100; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/TermSemi1_expr.js: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/TermSemi2.js: -------------------------------------------------------------------------------- 1 | foo==0&&(foo=1,foo=2); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/CommandLine/json.js: -------------------------------------------------------------------------------- 1 | {"foo":"bar","answer":42,"bat":[{"abc":123},{"name":"Ed","job":"Sewer Rat"},{"123":"abc"}]} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comments/Comment.js: -------------------------------------------------------------------------------- 1 | function Func(){/*@cc_on@if(1)alert("first");!0&&alert("second")@*/} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comments/EndWithImportantComment.js: -------------------------------------------------------------------------------- 1 | /*! START OF BLOCK NOTICE -- we need to retain these comments in the output */ 2 | var a=10; 3 | /*! END OF BLOCK NOTICE */ 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comments/Globals.js: -------------------------------------------------------------------------------- 1 | FooBar&&Foo&&Foo(FooBar,bat) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comments/ImportantComment_Off.js: -------------------------------------------------------------------------------- 1 | function foo(){}for(var a=12,b=13,ndx=0;ndx<10;++ndx); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comments/OnlyImportantComment.js: -------------------------------------------------------------------------------- 1 | /*! Copyright 2010 by Contoso Corp. All rights reserved */ 2 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comments/TwoImportantComments.js: -------------------------------------------------------------------------------- 1 | /*! First Important Comment */ 2 | /*! Second Important Comment */ 3 | var a=10 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comprehensions/ArrayComp.js: -------------------------------------------------------------------------------- 1 | function test1(){var n=[1,2,3,4,5,6,7,8,9,10],t=[for(t of n)if(t%2)t*t],i=[for(t of n)if(t!=2)for(i of n)if(i!=2)if(t!=i)[t,i]],r=[t*t for(t in n)if(t%2)];return t.concat(i,r)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comprehensions/GeneratorComp.js: -------------------------------------------------------------------------------- 1 | function test1(){for(var n in(for(n of[1,2,3,4,5])if(n%2)n*n))alert(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Comprehensions/NoParens.js: -------------------------------------------------------------------------------- 1 | var arr=[for(n in[1,2,3])for(t in[1,2,3])n+t],gen=(for(n in[1,2,3])for(t in[1,2,3])n+t) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/DoubleStart.js: -------------------------------------------------------------------------------- 1 | function foo(){/*@cc_on@if(@_win32)addWindowOnload=!1;@end@*/} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/EndEOF.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@if(@IsDebug)@*/(function(bar){alert(bar)})("ack");/*@end@*/ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/IETest.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@*/var o={IsIE:function(){var n=!1;/*@ n=!0@*/;return n}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/IfElse.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@if(@_jscript_version>=4)alert("JScript version 4 or better");@elif(@_jscript_version>7)alert("BETTER than JScript 7!");@else@*/alert("You need a more recent script engine.");/*@end@*/ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/MultipleOn.js: -------------------------------------------------------------------------------- 1 | var a,b;/*@cc_on@*/a=0;/*@if(@_win32)@*/a=1;/*@end@*/b/*@=1@*/;a&&alert("win32") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/MultipleOn_kill.js: -------------------------------------------------------------------------------- 1 | var a,b;/*@cc_on@*/a=0;/*@cc_on@if(@_win32)@*/a=1;/*@end@*/b/*@cc_on=1@*/;/*@cc_on@*/a&&alert("win32") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/NoEnd.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@set@fourteen=14@set@foobar=(@fourteen*02-8)@if(@foobar==20)@*/alert("twenty");/*@else@*/alert("not twenty") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/PPConstant.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@set@fourteen=14@set@foobar=(@fourteen*02-8)@if(@foobar==20)@*/alert(/*@foobar@*/);alert(/*@notdefined@*/);/*@else@*/alert("not twenty");/*@end@*/ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/Set.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@set@fourteen=14@set@foobar=(@fourteen*02-8)@if(@foobar==20)@*/alert("twenty");/*@else@*/alert("not twenty");/*@end@*/ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/SpecialCase.js: -------------------------------------------------------------------------------- 1 | function isIe(){if(/*@cc_on!@*/!1)return!0}var ie/*@=1@*/,ver/*@=@_jscript_version@*/,ack/*@=2@*/,foo/*@=(ver+!@bar)*12@*/,isMSIE=/*@!@*/0,bar=1;alert(ver) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/SpecialCase2.js: -------------------------------------------------------------------------------- 1 | /*@cc_on@*/var a/*@=1@*/,b/*@=2@*/;alert(!!a) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/StartWithIf.js: -------------------------------------------------------------------------------- 1 | @if(@_jscript_version>3)alert("gt 3");/*@elif(@_jscript_version==8)@*/alert("eq 8");/*@elif(@_jscript_version>8)@*/alert("gt 8");@else alert("le 3");@end -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/StartWithSet.js: -------------------------------------------------------------------------------- 1 | var pi,flag;@set@foo=(22/7)pi=/*@foo@*/;@set@false=(!1)flag=/*@false@*/;alert(flag) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ConditionalCompilation/TypeComments.js: -------------------------------------------------------------------------------- 1 | function myobj(foo){this.x=foo}function func1(x){return x+10}function func2(x){return""+x+20}function construct(foo){this.y=foo} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Break.js: -------------------------------------------------------------------------------- 1 | function Func(p1){for(var i=0;i<100;){if(i==p1)break;i++}for(i=0;i<100;i++)if(i==p1)break;return i} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/BreakLabel.js: -------------------------------------------------------------------------------- 1 | outer_block:{console.log("1");break outer_block} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/BreakNoLabel.js: -------------------------------------------------------------------------------- 1 | console.log("1");break -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/CatchScope.js: -------------------------------------------------------------------------------- 1 | function foo(){var err="local",anotherLocal=10;try{anotherLocal=100/0}catch(err){alert(err);anotherLocal=5}alert(err);alert(anotherLocal)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/CatchScope_Local.js: -------------------------------------------------------------------------------- 1 | function foo(){var t="local",n=10;try{n=100/0}catch(t){alert(t);n=5}alert(t);alert(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Continue.js: -------------------------------------------------------------------------------- 1 | function Func(p1){for(var i=0;i<100;){if(i==p1)continue;i++}for(i=0;i<100;i++)if(i==p1)continue;return i} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Continue_inv.js: -------------------------------------------------------------------------------- 1 | function Func(p1){for(var i=0;i<100;)i!=p1&&i++;for(i=0;i<100;i++)i==p1;return i} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/ForWhile.js: -------------------------------------------------------------------------------- 1 | function Func(p1){for(var i=0,j=0,a,c,t,y;i<100;){if(i==p1)break;i++}for(i=0;i<100;i++)if(i==p1)break;for(i=0;i<10;i++,j++)p1=i+j;for(;;)break;for(a=10,c=42;;)if(++a>c)break;while(--i>0);for(t=10,y=5;t>0;t--,y+=y);return i} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Return.js: -------------------------------------------------------------------------------- 1 | function Func(p1,p2){return p1*p2}function foo(){try{}catch(e){return 0}return 1}function bar(){with(obj)return 0;return 1} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Switch.js: -------------------------------------------------------------------------------- 1 | function Func(p1){var ret=0,ndx;switch(p1){case 1:ret=1;break;case 2:ret=-1;case 3:case 4:break;case 5:for(ndx=0;ndx<10;++ndx)ret*=p1;break;case ret.maxValue:ret=-2;break;default:break}return ret} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Switch_h.js: -------------------------------------------------------------------------------- 1 | function Func(n){var t=0,i;switch(n){case 1:t=1;break;case 2:t=-1;break;case 5:for(i=0;i<10;++i)t*=n;break;case t.maxValue:t=-2}return t} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Throw.js: -------------------------------------------------------------------------------- 1 | function foo(a,b,c,d,e){if(a)throw"now is the time";if(b)throw 42;if(c)throw!0;if(d)throw!1;if(e)throw new foobar} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/Throw_M.js: -------------------------------------------------------------------------------- 1 | function foo(a,b,c,d,e){if(a)throw"now is the time";if(b)throw 42;if(c)throw!0;if(d)throw!1;if(e)throw new foobar;} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/While.js: -------------------------------------------------------------------------------- 1 | for(var b=10;;)if(!--b)break;for(;;)alert("infinite loop!") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/While_ForNoVar.js: -------------------------------------------------------------------------------- 1 | var b=10;for(;;)if(!--b)break;for(;;)alert("infinite loop!") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ControlFlow/While_NoFor.js: -------------------------------------------------------------------------------- 1 | var b=10;while(1)if(!--b)break;while(1)alert("infinite loop!") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/DebugNamespaces/ConsoleDebug.js: -------------------------------------------------------------------------------- 1 | function test1(n,t){return n(t)}function test2(n){return n} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/DebugNamespaces/DebugAsKnownGlobal.js: -------------------------------------------------------------------------------- 1 | function foo(arf,bat){return Foo.Bar.Log("Arf: "+arf+"; bat: "+bat),arf+bat} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/DebugNamespaces/DebugAsKnownGlobal_debug.js: -------------------------------------------------------------------------------- 1 | function foo(arf,bat){return Foo.Bar.Log("Arf: "+arf+"; bat: "+bat),arf+bat} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/DebugNamespaces/DebugAsKnownGlobal_release.js: -------------------------------------------------------------------------------- 1 | function foo(arf,bat){return arf+bat} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/DebugNamespaces/DebugNamespaceDirective.js: -------------------------------------------------------------------------------- 1 | function foo(arf,bat){return arf+bat} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/DebugNamespaces/EmptyIf.js: -------------------------------------------------------------------------------- 1 | alpha;beta -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Declarations/Const.js: -------------------------------------------------------------------------------- 1 | const a=1,b=2,c=3;var d=4,e=5;const f=6,g=7 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Declarations/Const_moz.js: -------------------------------------------------------------------------------- 1 | const a=1,b=2,c=3;var d=4,e=5;const f=6,g=7 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Declarations/Function.js: -------------------------------------------------------------------------------- 1 | function foo(){function bar(){return 42}function ack(){alert("no one calls")}var bar=7;with(bar){function arf(){return 21}arf(5,6,,8)}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Declarations/LocalizationVars.js: -------------------------------------------------------------------------------- 1 | function foo(arr){for(var L_Error_Text="now is the time",ndx=0;ndxx^2 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/DestructuringAssignment.js: -------------------------------------------------------------------------------- 1 | var list=[7,42],[a=1,b=2,c=3,d]=list;a===7;b===42;c===3;d===undefined -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/ExpressionBodies.js: -------------------------------------------------------------------------------- 1 | odds=evens.map(v=>v+1);pairs=evens.map(v=>({even:v,odd:v+1}));nums=evens.map((v,i)=>v+i) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/ExpressionBodiesWithDestructuring.js: -------------------------------------------------------------------------------- 1 | tuples=evens.map(([v,i])=>v+i) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/GeneratorFunction.js: -------------------------------------------------------------------------------- 1 | let fibonacci={*[Symbol.iterator](){let pre=0,cur=1;for(;;)[pre,cur]=[cur,pre+cur],yield cur}};for(let n of fibonacci){if(n>1e3)break;console.log(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/GeneratorFunctionDirect.js: -------------------------------------------------------------------------------- 1 | function*range(start,end,step){while(start0)[pre,cur]=[cur,pre+cur],yield cur};for(let n of fibonacci(1e3))console.log(n);let numbers=[...fibonacci(1e3)],[n1,n2,n3,...others]=fibonacci(1e3) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/GeneratorMethods.js: -------------------------------------------------------------------------------- 1 | class Clz{*bar(){}}let Obj={*foo(){}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/IteratorsForEach.js: -------------------------------------------------------------------------------- 1 | let fibonacci={[Symbol.iterator](){let pre=0,cur=1 return{next(){[pre,cur]=[cur,pre+cur];return{done:false,value:cur}}}}}for(let n of fibonacci){if(n>1000)break;console.log(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/MethodProperties.js: -------------------------------------------------------------------------------- 1 | obj={foo(a,b){return a+b},bar(x,y){return x+y},*quux(x,y){return x-y}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/ObjectMatching.js: -------------------------------------------------------------------------------- 1 | var{op,lhs,rhs}=getASTNode(),{op:a,lhs:{op:b},rhs:c}=getASTNode(),obj={a:1},list=[1],{a,b=2}=obj,[x,y=2]=list -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/ObjectSpreadOperator.js: -------------------------------------------------------------------------------- 1 | const obj1={prop0:"val0",prop1:"val1"},obj2={...obj1,prop2:"val2"},obj3={...obj1,...obj2} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/ParameterContextMatching.js: -------------------------------------------------------------------------------- 1 | function f([name,val]){console.log(name,val)}function g({name:n,val:v}){console.log(n,v)}function h({name,val}){console.log(name,val)}f(["bar",42]);g({name:"foo",val:7});h({name:"bar",val:42}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/Proxying.js: -------------------------------------------------------------------------------- 1 | let target={foo:"Welcome, foo"},proxy=new Proxy(target,{get(receiver,name){return name in receiver?receiver[name]:`Hello, ${name}`}});proxy.foo==="Welcome, foo";proxy.world==="Hello, world" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/RestParameters.js: -------------------------------------------------------------------------------- 1 | function f(n,t,...i){return(n+t)*i.length}f(1,2,"hello",!0,7)===9;let y=({a:n,b:t,...i})=>n+t+i.length;y(1,2,3,4) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/SpreadOperator.js: -------------------------------------------------------------------------------- 1 | function t(){function i(n,t,...i){return(n+t)*i.length}var n=["hello",!0,7],u=[1,2,...n],t,r;i(1,2,...n)===9;t="foo";r=[...t]} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/StatementBodies.js: -------------------------------------------------------------------------------- 1 | nums.forEach(v=>{v%5==0&&fives.push(v)}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/StaticMembers.js: -------------------------------------------------------------------------------- 1 | class Rectangle extends Shape{static defaultRectangle(){return new Rectangle("default",0,0,100,100)}defaultRectangle(a,b,c,d){return new Rectangle("default",a,b,c,d)}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/StringInterpolation.js: -------------------------------------------------------------------------------- 1 | var customer={name:"Foo"},card={amount:7,product:"Bar",unitprice:42},message=`Hello ${customer.name}, 2 | want to buy ${card.amount} ${card.product} for 3 | a total of ${card.amount*card.unitprice} bucks?` -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2015/TaggedTemplates.js: -------------------------------------------------------------------------------- 1 | get`http://example.com/foo?bar=${bar+baz}&quux=${quux}` -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2016/Exponent.js: -------------------------------------------------------------------------------- 1 | function r(a,b){return a**b}let x=2**5.1,y=3**x,z=2**81,p=21 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2016/ExponentAssign.js: -------------------------------------------------------------------------------- 1 | let y=3**x;y**=2;let x=5;x**=y**x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2017/AsyncArrowFunction.js: -------------------------------------------------------------------------------- 1 | const object={regularFunction:test=>"done"+test,asyncArrowFunctionWithoutParameters:async()=>await fetch("someurl"),asyncArrowFunctionWithParameters:async url=>await fetch(url)};object.doSomethingAsync() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2017/AsyncAwait.js: -------------------------------------------------------------------------------- 1 | async function getDataFromAjax(url){let data;try{data=await fetch(url);fillClientStateWithData(data.json())}catch(error){handleAjaxError(error)}}getDataFromAjax() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2017/AsyncClassFunction.js: -------------------------------------------------------------------------------- 1 | class MyClass{async getDataFromAjax(url){let data;try{data=await fetch(url);fillClientStateWithData(data.json())}catch(error){handleAjaxError(error)}}}(new MyClass).getDataFromAjax() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2017/AsyncFunctionExpressions.js: -------------------------------------------------------------------------------- 1 | let func=async function(x){return x+1};func();let async=1,variable=async -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2017/TrailingComma.js: -------------------------------------------------------------------------------- 1 | function hi(a,b){console.log(`hi ${a} and ${b}`)}class C{one(a){a=1}two(a,b){a=1;b=2}}var obj={one(a){a=1},two(a,b){a=1;b=2}};hi("world","es8") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2018/ForAwait.js: -------------------------------------------------------------------------------- 1 | (async function(){try{for await(let num of generator())console.log(num)}catch(e){console.log("caught",e)}})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2018/SpreadOperator.js: -------------------------------------------------------------------------------- 1 | let object={a:1,b:2},objectClone={...object},otherObject={c:3,...object} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2019/OptionalCatchBinding.js: -------------------------------------------------------------------------------- 1 | try{console.log(1)}catch{} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2020/BigIntInitialisation.js: -------------------------------------------------------------------------------- 1 | const theBiggestInt=9007199254740991n,alsoHuge=9007199254740991n,hugeString=9007199254740991n,hugeHex=9007199254740991n,hugeBin=9007199254740991n,unrelated=foo.BigInt(9007199254740991) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2020/GlobalThis.js: -------------------------------------------------------------------------------- 1 | function f(n){return n*2}f(globalThis) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2020/NullCoalesce.js: -------------------------------------------------------------------------------- 1 | function y(){return 1}let p=null,a=b??"test",r=p?p??!0:!1,s=3,x=!1;let z=y()+s -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2020/NullCoalesceAndOr.js: -------------------------------------------------------------------------------- 1 | let a=!0,b=(a??!1)||!0,c=(a??!1)&&!0,d=(a&&!1)??!0,e=(a||!1)??!0,f=a??!1??!0,g=!0||(a??!1),h=!0&&(a??!1),i=a??a&&!1,j=a??a||!1,k=a??a??!1 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2020/OptionalChaining.js: -------------------------------------------------------------------------------- 1 | let x=foo?.bar,y=foo?.(),z=foo?.()?.[a],p=foo?.3:0;a(x+y+z) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/LogicalAndAssign.js: -------------------------------------------------------------------------------- 1 | let x=!1;x&&=y&&!0 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/LogicalNullishAssign.js: -------------------------------------------------------------------------------- 1 | let x=null;x??=y??!0 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/LogicalOrAssign.js: -------------------------------------------------------------------------------- 1 | let x=!1;x||=y||!0 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsBinary1.js: -------------------------------------------------------------------------------- 1 | let y=2 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsBinary2.js: -------------------------------------------------------------------------------- 1 | let y=2 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsDecimal1.js: -------------------------------------------------------------------------------- 1 | let y=12.3 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsDecimal2.js: -------------------------------------------------------------------------------- 1 | let y=1.23 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsDecimalAfter.js: -------------------------------------------------------------------------------- 1 | let x=1._2,y=x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsDecimalBefore.js: -------------------------------------------------------------------------------- 1 | let x=1_.2,y=x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsExponent1.js: -------------------------------------------------------------------------------- 1 | let y=12e3 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsExponent2.js: -------------------------------------------------------------------------------- 1 | let y=1e23 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsExponentAfter.js: -------------------------------------------------------------------------------- 1 | let x=1e_2,y=x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsExponentBefore.js: -------------------------------------------------------------------------------- 1 | let x=1_e2,y=x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsHex1.js: -------------------------------------------------------------------------------- 1 | let y=18 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsHex2.js: -------------------------------------------------------------------------------- 1 | let y=18 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsInteger.js: -------------------------------------------------------------------------------- 1 | let y=12 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsNoAdjacent.js: -------------------------------------------------------------------------------- 1 | let x=1__2,y=x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsNoTrailing.js: -------------------------------------------------------------------------------- 1 | let x=1_,y=x -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsOctal1.js: -------------------------------------------------------------------------------- 1 | let y=10 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ES2021/NumericSeparatorsOctal2.js: -------------------------------------------------------------------------------- 1 | let y=10 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Encodings/SurrogateHighError.js: -------------------------------------------------------------------------------- 1 | var str="\ud83d" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Encodings/SurrogateLowError.js: -------------------------------------------------------------------------------- 1 | var str="\ude80" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Encodings/UnicodeExtended.js: -------------------------------------------------------------------------------- 1 | var unicode="🚀",escape="🚀",surrogate="🚀" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Encodings/UnicodeExtended_ascii.js: -------------------------------------------------------------------------------- 1 | var unicode="\ud83d\ude80",escape="\ud83d\ude80",surrogate="\ud83d\ude80" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/Arguments.js: -------------------------------------------------------------------------------- 1 | function Func(){var i,s,numargs=arguments.length;for(s=numargs,s+=numargs<2?" argument was passed to ArgTest. It was ":" arguments were passed to ArgTest. They were ",i=0;i{this.sum=n+t+i})(1,2,3) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/ArrowFunctionAsArgument.js: -------------------------------------------------------------------------------- 1 | hello(([t])=>t);hello(({t})=>t);hello(t=>t) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/BadLocation.js: -------------------------------------------------------------------------------- 1 | function foo(a){if(a){bar(a);function bar(x){alert(x)}}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/BadSemicolon.js: -------------------------------------------------------------------------------- 1 | function foo(a,b,c){alert(a);document.write(b+c)}foo("arf","woof","yip") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/DefaultValues.js: -------------------------------------------------------------------------------- 1 | +function(){function test1(a=init,b=[location.href,document.domain]){var init="inner";alert("a="+a+"; b=["+b[0]+","+b[1]+"]; init="+init)}test1()}("outer") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/Generator.js: -------------------------------------------------------------------------------- 1 | function*myGenerator(n){for(var t of n)yield t} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/NewFunction.js: -------------------------------------------------------------------------------- 1 | function Func(){var add=new Function("x","y","return(x+y)");add(2,3)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/FunctionCreation/VarArgList.js: -------------------------------------------------------------------------------- 1 | function foo(bar,...ack){return bar+ack.join(" and ")} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/GlobalMethods/AssumedGlobals.js: -------------------------------------------------------------------------------- 1 | function foo(n){window.bar&&bar(n)}function ack(n){window.bat&&bat(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/GlobalMethods/BrowserSpecific.js: -------------------------------------------------------------------------------- 1 | function raf(){return requestAnimationFrame||webkitRequestAnimationFrame||mozRequestAnimationFrame||oRequestAnimationFrame||msRequestAnimationFrame||function(n){typeof n=="function"&&setTimeout(n,16.7)}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/GlobalMethods/DOMElements.js: -------------------------------------------------------------------------------- 1 | function isElement(n){return n instanceof HTMLElement} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/GlobalMethods/Eval.js: -------------------------------------------------------------------------------- 1 | function Func(){eval("var mydate = new Date();");eval(function(){return"arf"})} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/GlobalMethods/GlobalObject.js: -------------------------------------------------------------------------------- 1 | var foo=NaN,d=document;moveTo(x,y) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/GlobalMethods/SpecialEval.js: -------------------------------------------------------------------------------- 1 | x=(0,eval)("this");y=(0,eval)("this") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/LexicalDeclarations/ConstAssign.js: -------------------------------------------------------------------------------- 1 | while(window.foo){const n=42;n+=2;++n;alert(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/LexicalDeclarations/LexBlock.js: -------------------------------------------------------------------------------- 1 | for(var ndx=1;ndx<=10;++ndx){console.log(ndx);{let n=ndx*ndx;ndx==5&&(n+=ndx);console.log(n)}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/LexicalDeclarations/LexConst.js: -------------------------------------------------------------------------------- 1 | function foo(n){for(var t=0;t");alert('<%= Request('foo') %>');var foo="<%= Request("foo1") %>"+'<%= Request("bar1") %>',bar="<%= Request("foo2") %>"+"<%= Request("bar2") %>" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/Boolean.js: -------------------------------------------------------------------------------- 1 | var t=!0,f=!1,a=(!0).toString(),b=(!0)["123"],c=(!0)(!1) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/GetterSetter.js: -------------------------------------------------------------------------------- 1 | var o={foo:42,get val(){return this.foo},set val(v){this.foo=v}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/InlineSafe.js: -------------------------------------------------------------------------------- 1 | var foo1="<\/script>",foo2="]\]>",foo3="while(0)<\/script>",foo4="foobar]\]>",bar1="<\/script>",bar2="<\/script>",bar3="<\/script>",bar4="]\]>",bar5="]\]>" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/InlineSafeErrors.js: -------------------------------------------------------------------------------- 1 | var one="<\/script>",two="]\]>",three="<\/script>",four="]\]>" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/InlineSafeErrors_on.js: -------------------------------------------------------------------------------- 1 | var one="<\/script>",two="]\]>",three="<\/script>",four="]\]>" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/InlineSafe_no.js: -------------------------------------------------------------------------------- 1 | var foo1="",foo2="]]>",foo3="while(0)",foo4="foobar]]>",bar1="",bar2="",bar3="",bar4="]]>",bar5="]]>" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/LoneHighSurrogate.js: -------------------------------------------------------------------------------- 1 | var text="\ud800" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/LoneLowSurrogate.js: -------------------------------------------------------------------------------- 1 | var text="\udc00" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/NullCharacter.js: -------------------------------------------------------------------------------- 1 | var msg="Null character ==><== Whoo!",foo;alert(msg);foo="nullchar"+"-null\x00escape42" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/Octal.js: -------------------------------------------------------------------------------- 1 | var threeOne1="\0",threeOne1="\0xxx",threeTwo1="\02",threeTwo1="\02xxx",threeThree1="\123",threeThree2="\123xxx",twoOne1="\6",twoOne2="\6xxx",twoTwo="\46",twoTwo="\46xxx",twoTwoPlus="\773",concat='\123'+'\77' -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/RegExp.js: -------------------------------------------------------------------------------- 1 | function test1(text){return/the/.exec(text)}function test2(text){for(var re=/the/g,count=0,match;match=re.exec(text);)++count;return count}var foo=location.href.replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]/|]/g,"-"),re=/\w+/;alert("hi") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/StrictEncoding.js: -------------------------------------------------------------------------------- 1 | function myStrict(a,b){"use strict";return a+=b,b=+a*200,"one\x02two"+a+b}function notStrict(a,b){return a+=b,b=+a*200,"one\x02two"+a+b} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Literals/TemplateLiteralsEscaped.js: -------------------------------------------------------------------------------- 1 | var a=new RegExp(`<[\\w-\\d]$`,"i"),b;a=new RegExp("<[\\w-\\d]$","i");b=`\`this is \`${1} 2 | escaped\`${2}` -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Modules/BadExport.js: -------------------------------------------------------------------------------- 1 | function foo(n){var t=n*n;export{t as BarSquared};return t} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Modules/ExportRename.js: -------------------------------------------------------------------------------- 1 | module"test1"{function n(n,t){return n+t}var t="bus driver",i="sewer rat";export{t as ralph,i as ed,n as sum,window as w}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Modules/Exports.js: -------------------------------------------------------------------------------- 1 | export function foobar(n,t,i){return n>>3} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Operators/Comma.js: -------------------------------------------------------------------------------- 1 | function uxp_toggleElementVisibility_return(e){var o=e.style;return"none"===o.display?(o.display="",1):(o.display="none",0)}var t=foo(bar,(ack,gag)),y=(t,foo,bar);z=a;b;c;document -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Operators/ConditionalPrecedence.js: -------------------------------------------------------------------------------- 1 | function test1(a,b,c){return(a?b:c)?"A":"B"}function test2(a,b){return a?"A":b?"B":"C"}function test3(a,b){return a?"A":b?"B":"C"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Operators/In.js: -------------------------------------------------------------------------------- 1 | var t=function(x,y){return x in y};t["do"]in t;t in(Array||Object);t["do"]in(Array||Object) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Operators/InstanceOf.js: -------------------------------------------------------------------------------- 1 | var a,b={};a instanceof Array;b["if"]instanceof Array;a instanceof(b||Array);b["if"]instanceof(b||Array) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Operators/TypeOf.js: -------------------------------------------------------------------------------- 1 | function test(n){alert(n+typeof window.foop)}var foo=typeof bar;(function(n){alert(typeof n.foobarbatack)})(window);with(window.ackbar)alert(typeof window.qwerty) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Operators/Void.js: -------------------------------------------------------------------------------- 1 | function Lro(rye){try{return rye===void 0?void rye:rye}catch(e){return void(rye=0)}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/BadDefines.js: -------------------------------------------------------------------------------- 1 | foo=1;foo=2;alert("foobar is defined") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/BadIfDef.js: -------------------------------------------------------------------------------- 1 | var one=1,one=2;foobar;alert("hi");var two=2,two=3,foo="not 3",bar=3 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/DebugClear.js: -------------------------------------------------------------------------------- 1 | function foo(bar){Msn.Debug.Log("foobar!");WAssert("foobar again!");$Debug.Trace.This;Debug.Assert(bar!=null);Web.Debug("narf")} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/DebugSet.js: -------------------------------------------------------------------------------- 1 | function ack(bar){return bar*bar} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/DebugSet_debug.js: -------------------------------------------------------------------------------- 1 | function ack(bar){return Foo.Bar.alert(bar),bar*bar} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/DefineIf.js: -------------------------------------------------------------------------------- 1 | var a="foobar",b="not foobar",c="not Admiral Ackbar",v="unknown" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/Defines.js: -------------------------------------------------------------------------------- 1 | var a="foobar is batman",b="not foobar",c="not ackbar" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/Defines_ackbar.js: -------------------------------------------------------------------------------- 1 | var a="foobar is batman",b="not foobar",c="ackbar" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/Defines_ackbarmeow.js: -------------------------------------------------------------------------------- 1 | function meow(){alert("MEOW!")}var a="foobar is batman",b="not foobar",c="ackbar" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/Nested.js: -------------------------------------------------------------------------------- 1 | alert("not bar");alert("foo");alert("not bar1");alert("foo");alert("not bar2") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Preprocessor/SourceDirective.js: -------------------------------------------------------------------------------- 1 | foo(bar);bar(foo) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/IfFunction.js: -------------------------------------------------------------------------------- 1 | function woot(n){if(n!=null){function t(n){alert(n)}t("Hi")}alert(n)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/LabelKeyword.js: -------------------------------------------------------------------------------- 1 | _if:_do:for(var ndx=1;ndx<10;++ndx)if(ndx>5)break _if;else if(ndx==3)continue _do -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/NestedGlobals.js: -------------------------------------------------------------------------------- 1 | (function(){function n(){function n(t){g(t)&&n(t-1)}var t=location.href;n(10)}alert(g);n()})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/SafeAll.js: -------------------------------------------------------------------------------- 1 | (function(){function foo(code){return eval(code)}function bar(t,i){alert(n+t+i)}var n="outer n";bar("one","two");bar("three","four");foo("debugger")})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/SafeAll_imm.js: -------------------------------------------------------------------------------- 1 | (function(){function i(code){return eval(code)}function n(n,i){alert(t+n+i)}var t="outer n";n("one","two");n("three","four");i("debugger")})() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/Super.js: -------------------------------------------------------------------------------- 1 | function one(n,t,i){var $super="ralph"+n;return $super+t+i}function two($super,n,t){return $super+n-t}function three(n,t,$super){return n-t+$super} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Renaming/evalImmediate.js: -------------------------------------------------------------------------------- 1 | (function(Foo){function n(){for(var n=0;n<10;++n)Foo.bar=n;eval("alert('hi')")}return n})(window.Foo||(window.Foo={})) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ResourceMerge/ReplacementTokens.js: -------------------------------------------------------------------------------- 1 | var foo=%SimpleName%,bar=%Complex.Name.With.Qualifiers%,bat=%ಠ_ಠ.ლ_ಠ益ಠ_ლ.123%,fallback1=%TokenName:string%,fallback2=%TokenName:num%,fallback3=%TokenName:% -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ResourceMerge/ResourceJS.js: -------------------------------------------------------------------------------- 1 | function foo(bar){if(bar)alert("You called foo with "+bar);else alert("You called foo with [null]!!"+b)}foo("bar!");var a="" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ResourceMerge/ResourceResx.js: -------------------------------------------------------------------------------- 1 | function foo(bar){bar?alert("You called the 'foo' function "+bar):alert("You called the 'foo' function [null]!!"+b)}foo("bar!") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ResourceMerge/Resources.js: -------------------------------------------------------------------------------- 1 | function foo(n){n?alert("Calling all FOO:"+n):alert("Calling all FOO:[null]!!"+b)}foo("bar!") -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ResourceMerge/StringsFooBar.js: -------------------------------------------------------------------------------- 1 | function foo(){var not=Strings.Ack.Bar.Not;return"First Resource String Second Resource String"} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ScannerErrors/BadHexDigit.js: -------------------------------------------------------------------------------- 1 | var badHex=0xRT -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ScannerErrors/StringEOF.js: -------------------------------------------------------------------------------- 1 | var str="now is the time -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ScannerErrors/StringEOL.js: -------------------------------------------------------------------------------- 1 | var un="now is the time",forall="good men" -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/ScannerErrors/UnexpectedNull.js: -------------------------------------------------------------------------------- 1 | var a=10;alert(a) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/SourceMap/MapArgNotSpecified.js: -------------------------------------------------------------------------------- 1 | function write(i){document.write("The number is "+i);document.write("
")}for(var i=0,i=0;i<=100;i++)i%2==0&&write(i) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/SourceMap/SourceMapForMultipleFiles.js: -------------------------------------------------------------------------------- 1 | function func1(){return 1}function func2(){return 2}function func3(){return 3} 2 | //# sourceMappingURL=SourceMapForMultipleFiles.js.map 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/StdIn/StdInTest.js: -------------------------------------------------------------------------------- 1 | function foo(n,t){return n?t:!t} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/DupArg.js: -------------------------------------------------------------------------------- 1 | function test1(){"use strict";function foo(one,two,three,one,four){return one+two+three+four}return foo()}function test2(){function bar(one,two,one,three){return one+two+three}return bar()} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/EvalArgsAssign.js: -------------------------------------------------------------------------------- 1 | "use strict";function test1(){eval=function(txt){alert("eval: "+txt)};arguments={}}function test2(){++eval;eval--;--arguments;arguments++} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/ExtraUseStrict.js: -------------------------------------------------------------------------------- 1 | "use strict";function foo(p){function bar(q){return q+q}return bar(p)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/FuncDeclLoc.js: -------------------------------------------------------------------------------- 1 | function foo(arf){if(arf){function bar(){alert("wow")}bar()}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/FuncDeclStrict.js: -------------------------------------------------------------------------------- 1 | "use strict";function foo(arf){if(arf){function bar(){alert("wow")}bar()}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/InvalidDelete.js: -------------------------------------------------------------------------------- 1 | "use strict";function test1(a,b){function foo(x){return x*x}var c=a+b;delete a;delete c;delete foo} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/StrictPartial.js: -------------------------------------------------------------------------------- 1 | +function(n,t){"use strict";n.console&&console.log("start");n.foo||n.alert(t.location);n.console&&console.log("end")}(window,document) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/StrictSwitchOn.js: -------------------------------------------------------------------------------- 1 | "use strict";function foo(bar){alert("foo: "+bar)}function bar(foo){alert("bar: "+foo)} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/UnknownGlobal.js: -------------------------------------------------------------------------------- 1 | function foo(n){"use strict";return bar=n.cave||location.href,ack(bar)+vat++} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Strict/With.js: -------------------------------------------------------------------------------- 1 | "use strict";with(location)alert(href) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/Braces.js: -------------------------------------------------------------------------------- 1 | function foo(bar){var ext,ndx,suffix;if(bar){for(ext=bar,ndx=0;ndx<10;++ndx){switch(ndx){case 2:suffix="x";break;case 4:suffix="4";break;case 6:suffix="6";break;default:suffix="-"}ext+=suffix}return ext}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/EmptyDefault_h.js: -------------------------------------------------------------------------------- 1 | function f(n,t,i,r,u){var f="0";switch(n){case 1:f="1";break;case 2:f="2"}switch(t){case 1:f="1";break;case 2:f="2"}switch(i){}switch(r){case 4:n=0}switch(u){case 1:n=1}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/IgnoreErrors.js: -------------------------------------------------------------------------------- 1 | (function($){myAlert($[msg]+10)}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/IgnoreErrors_all.js: -------------------------------------------------------------------------------- 1 | (function($){myAlert($[msg]+10)}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/IgnoreErrors_some.js: -------------------------------------------------------------------------------- 1 | (function($){myAlert($[msg]+10)}) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/LineBreak.js: -------------------------------------------------------------------------------- 1 | function bar( 2 | first,second) 3 | {return first> 4 | second?foo+ 5 | ":"+second+ 6 | first+text: 7 | foo+":"+first+ 8 | second+text} 9 | var text="the quick brown fox jumped over the big log", 10 | foo=42 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/LineBreak_BreakSingle.js: -------------------------------------------------------------------------------- 1 | function bar( 2 | first,second) 3 | {return first> 4 | second?foo+ 5 | ":"+second+ 6 | first+text: 7 | foo+":"+first+ 8 | second+text} 9 | var text="the quick brown fox jumped over the big log", 10 | foo=42 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/LineBreak_Multi.js: -------------------------------------------------------------------------------- 1 | function bar(first, second) 2 | { 3 | return first > second ? foo + ":" + second + first + text : foo + ":" + first + second + text 4 | } 5 | var text = "the quick brown fox jumped over the big log", 6 | foo = 42 -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/MacQuirks.js: -------------------------------------------------------------------------------- 1 | var foo,bar;if(foo==bar){alert(foo);throw"foo equals bar"}if(foo!=bar)function foobar(){return foo||bar} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/MacQuirks_M.js: -------------------------------------------------------------------------------- 1 | var foo,bar;if(foo==bar){alert(foo);throw"foo equals bar";}if(foo!=bar){function foobar(){return foo||bar}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoBreakBreak.js: -------------------------------------------------------------------------------- 1 | break mylabel; 2 | next( 3 | ) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoBreakContinue.js: -------------------------------------------------------------------------------- 1 | continue mylabel; 2 | next( 3 | ) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoBreakPostDec.js: -------------------------------------------------------------------------------- 1 | fooBar--; 2 | f() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoBreakPostInc.js: -------------------------------------------------------------------------------- 1 | fooBar++; 2 | f() -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoBreakReturn.js: -------------------------------------------------------------------------------- 1 | return new 2 | F -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoBreakThrow.js: -------------------------------------------------------------------------------- 1 | throw new 2 | F; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoDefaultEmptyCases.js: -------------------------------------------------------------------------------- 1 | function f(a,b,c){var x="0";switch(a){case 1:break;case 2:x="2";break;default:break}switch(b){case 1:x="1";break;default:break;case 2:break}switch(c){case 1:case 2:break;default:break}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/NoDefaultEmptyCases_h.js: -------------------------------------------------------------------------------- 1 | function f(n,t,i){var r="0";switch(n){case 2:r="2"}switch(t){case 1:r="1"}switch(i){}} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Expected/Switch/PrettyPrint.js: -------------------------------------------------------------------------------- 1 | function foo(){var a=1,b=2,c="three",d,f;try{for(d=a*b;d>0;){switch(c){case"three":c=10;break;case 0:c=-1;break;default:c=c*2}c?(d=d*c,a*=d):c=1}}catch(e){for(f=0;f; 2 | 3 | ident += foo * <%= foo %> + 10; 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/AspNet/Identifiers.js: -------------------------------------------------------------------------------- 1 | function <%= prefix %>Root<%= suffix %>( foo ) 2 | { 3 | alert( foo< foo<%= Request("foo") %> ); 4 | } 5 | 6 | function bar<%= this.ID %>(arf) 7 | { 8 | return arf + <%= this.Arf %>; 9 | } 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Assignments/AssignAspNetBlock.js: -------------------------------------------------------------------------------- 1 | function Func() 2 | { 3 | var x= <%= test %>; 4 | Func(x); 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/AstMods/NestedIf.js: -------------------------------------------------------------------------------- 1 | function foo(a,b) 2 | { 3 | if (a !== null) 4 | { 5 | if (typeof b === "string") 6 | { 7 | return a + b; 8 | } 9 | } 10 | 11 | return ""; 12 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/AstMods/amd.js: -------------------------------------------------------------------------------- 1 |  2 | define("foo", ["ralph"], function (ralph) { alert(ralph); }); 3 | 4 | var x = 42; 5 | 6 | define("bar", function () { return { one: "two" }; }); 7 | define("foo", ["bar"], function (bar) { alert(bar.one); }); 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug138.js: -------------------------------------------------------------------------------- 1 | const o = { 2 | async testSub() 3 | { 4 | return 1; 5 | } 6 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug156.js: -------------------------------------------------------------------------------- 1 | a?.b; 2 | let x = a?.b; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug159.js: -------------------------------------------------------------------------------- 1 | if (x) { 2 | const y = x; 3 | } 4 | while (y) { 5 | let z = y; 6 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug160.js: -------------------------------------------------------------------------------- 1 | let x = n => !n.a && n.b == c; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug163.js: -------------------------------------------------------------------------------- 1 | import("some.js"); 2 | 3 | var x = await import("some.js"); 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug197.js: -------------------------------------------------------------------------------- 1 | var obj = { 2 | one: 1, 3 | primitiveArray: [1, 2, 3], 4 | objArray: [ 5 | { one: 1 }, 6 | { two: 2 } 7 | ] 8 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug199JS.js: -------------------------------------------------------------------------------- 1 | let x = { 2 | "\\foo": "\tbar\\\nlol" 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug199JSON.json: -------------------------------------------------------------------------------- 1 | { 2 | "\\foo": "\tbar\\\nlol" 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug200.js: -------------------------------------------------------------------------------- 1 | const obj = (function(){ 2 | const dummy = "1234"; 3 | const foo = "4567"; 4 | return { bar: foo, dummy } 5 | })(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug201.js: -------------------------------------------------------------------------------- 1 | const sum = function ({ foo = 2, dummy = 3 }) { 2 | return foo + dummy; 3 | }; 4 | 5 | const sum2 = ({ foo2 = 2, dummy2 = 3 }) => foo2 + dummy2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug204.js: -------------------------------------------------------------------------------- 1 | function func(a, b) { 2 | return { [a.name]: b }; 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug214.js: -------------------------------------------------------------------------------- 1 | export class MyClass { 2 | set property(_value) { } 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug215.js: -------------------------------------------------------------------------------- 1 | export class Loader { 2 | set(not, a, setter) { 3 | alert(not + a + setter); 4 | } 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug216.js: -------------------------------------------------------------------------------- 1 |  2 | function test() { 3 | const map = new Map(); 4 | for (const [key, value] of map) alert(key + value); 5 | } 6 | test(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug241.js: -------------------------------------------------------------------------------- 1 | function foo() { 2 | var of = 1; 3 | 4 | return of; 5 | } 6 | 7 | function of() { 8 | return foo(); 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug264.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const SomeClass = { 4 | method1() { 5 | }, 6 | 7 | method2() { 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug266.js: -------------------------------------------------------------------------------- 1 | var a = { 2 | set(element, key, instance) { 3 | return element + key + instance; 4 | } 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug279.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const config = { 3 | ...Manipulator.getDataAttributes(target), 4 | ...Manipulator.getDataAttributes(this), 5 | ...(true ? false : true), 6 | ...(false ? true : false) 7 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug284.js: -------------------------------------------------------------------------------- 1 |  2 | lambda (container) => { 3 | console.log(1); 4 | }; 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug290.js: -------------------------------------------------------------------------------- 1 | let foo, bar; 2 | ({ foo, bar } = { foo: 42, bar: true }); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug293.js: -------------------------------------------------------------------------------- 1 | async function myfunc() 2 | { 3 | return await myfunc() === "value"; 4 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug298.js: -------------------------------------------------------------------------------- 1 | class n { 2 | constructor() { 3 | const s = new.target.prototype; 4 | } 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug301.js: -------------------------------------------------------------------------------- 1 | let x = 1; 2 | if (p != null && (yield isOk(p)) != null) 3 | x = 2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug305.js: -------------------------------------------------------------------------------- 1 | let x = String.raw`foo`; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug306.json: -------------------------------------------------------------------------------- 1 | { 2 | "@context": "http://schema.org/", 3 | "@type": "WebSite", 4 | "url": "https://domain.ext", 5 | "name": "Name Site", 6 | "isChecked": true, 7 | "alternateName": null 8 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug35.js: -------------------------------------------------------------------------------- 1 | var a = true, b = false; 2 | if (!a || b) { 3 | console.log(1); 4 | } 5 | var x = !a || b -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug353.js: -------------------------------------------------------------------------------- 1 | class HttpClient { 2 | delete(url, options) { 3 | return this.send({ 4 | ...options, 5 | method: "DELETE", 6 | url, 7 | }); 8 | } 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug360.js: -------------------------------------------------------------------------------- 1 | export async function fooAsync(){} -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug375.js: -------------------------------------------------------------------------------- 1 | function func() { 2 | var module; 3 | 4 | let abc = 'text'; 5 | 6 | module = {}; 7 | module.data = "text"; 8 | module["data2"] = 5; 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug391.js: -------------------------------------------------------------------------------- 1 | function func() { 2 | return { 3 | ...{ 4 | arrow: () => { }, 5 | anonymous: function () { }, 6 | named: function name() { }, 7 | } 8 | }; 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug394.js: -------------------------------------------------------------------------------- 1 | const someFunc = ({ val, op = 'eq' }) => { 2 | var useOp = op + val; 3 | }; 4 | 5 | var args = { 6 | val: 'va', 7 | op: 'contains' 8 | }; 9 | 10 | someFunc(args); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug429.js: -------------------------------------------------------------------------------- 1 | const test = await import('lib/math'); 2 | console.log(test.pi); 3 | 4 | if (import.meta !== undefined) { 5 | console.log(`imported url ${import.meta.url}`); 6 | console.log(`resolved path ${import.meta.resolve(test.pi)}`); 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug57.js: -------------------------------------------------------------------------------- 1 | var a; 2 | if (a != null) { 3 | (yield 1); 4 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug63.js: -------------------------------------------------------------------------------- 1 | switch= 1) eval('1'); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug70.js: -------------------------------------------------------------------------------- 1 | var x = "hello" + " world"; 2 | 3 | var y = `Hello 4 | world`; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug76.js: -------------------------------------------------------------------------------- 1 | function x(a) { 2 | let b = c(d); 3 | if (b === "e") { 4 | return b; 5 | } else { 6 | let f = this.e(a); 7 | var h = this.g([f]); 8 | return f + h; 9 | } 10 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug78.js: -------------------------------------------------------------------------------- 1 | var reg = /[^]/; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug79.js: -------------------------------------------------------------------------------- 1 | function go(scope) { 2 | 3 | for (let test in scope) { 4 | console.log(test); 5 | } 6 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug80.js: -------------------------------------------------------------------------------- 1 | var o = { 2 | "a": function (async) { 3 | async = () => 1; 4 | async[1] = 2; 5 | // TODO: this is currently buggy 6 | //async(b); 7 | } 8 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug87.js: -------------------------------------------------------------------------------- 1 | function test() { 2 | this.prueba = prueba2; 3 | 4 | function prueba2() { 5 | alert("hola"); 6 | } 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug92.js: -------------------------------------------------------------------------------- 1 | var x = async arg => { return 0; }; 2 | Promise.then(async arg => { return 0; }); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Bugs/Bug94.js: -------------------------------------------------------------------------------- 1 | const test = "1"; 2 | function test(module) { 3 | module.exports = function () { 4 | 5 | }; 6 | module.foo = x(module); 7 | 8 | function x(module) { 9 | module.bar = "baz"; 10 | } 11 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CatchVariable/ForInLet.js: -------------------------------------------------------------------------------- 1 | function go(scope) { 2 | for (let test in scope.prop) { 3 | console.log(test); 4 | } 5 | } 6 | 7 | go({ prop: [1, 2, 3] }); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CatchVariable/OuterIsGlobal.js: -------------------------------------------------------------------------------- 1 | var err; 2 | try 3 | { 4 | // "undefined variable" error 5 | alert(foo); 6 | } 7 | catch(err) 8 | { 9 | } 10 | alert(err); 11 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Classes/ClassNormalAndStaticProperty.js: -------------------------------------------------------------------------------- 1 | class Foo 2 | { 3 | static get bar() { return ""; } 4 | get bar() { return Foo.bar(); } 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/ConcatSemicolons.js: -------------------------------------------------------------------------------- 1 | // this file doesn't end in a semicolon. 2 | // when concating with other files, we will need to add one to keep it distinct. 3 | (function($) 4 | { 5 | $(function(){alert("Hi!");}); 6 | })(jQuery) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/EventHandler.js: -------------------------------------------------------------------------------- 1 | var foo = 42 + event.x; 2 | alert( foo ); 3 | event.preventDefault(); 4 | return false; 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/Globals.js: -------------------------------------------------------------------------------- 1 | function ack() 2 | { 3 | foobar( foo, bar ); 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/TermSemi1.js: -------------------------------------------------------------------------------- 1 | 2 | // normally the last statement wouldn't end in a semi-colon 3 | var r = 100; 4 | r = r + 100; 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/TermSemi2.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | // this if-block wouldn't normally end in a semicolon, 4 | // but the -Z option forces it to 5 | if ( foo == 0 ) 6 | { 7 | foo = 1; 8 | foo = 2; 9 | } 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/concat-partial2.js: -------------------------------------------------------------------------------- 1 | // partial script. End with special comment to keep NUglify from adding a semicolon 2 | first: 1, //; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/concat-partial3.js: -------------------------------------------------------------------------------- 1 | // partial script. End with special comment to keep NUglify from adding a semicolon 2 | second: "two", 3 | 4 | 5 | //; 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/concat-partial4.js: -------------------------------------------------------------------------------- 1 | // this is the closing partial to make the statement valid 2 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/CommandLine/json.js: -------------------------------------------------------------------------------- 1 | { 2 | "foo":"bar", 3 | "answer":42, 4 | "bat":[ { "abc": 123 }, 5 | { "name":"Ed", "job":"Sewer Rat" }, 6 | { "123": "abc" }] 7 | } 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Comments/EndWithImportantComment.js: -------------------------------------------------------------------------------- 1 | /*! START OF BLOCK NOTICE -- we need to retain these comments in the output */ 2 | var a = 10; 3 | /*! END OF BLOCK NOTICE */ -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Comments/Globals.js: -------------------------------------------------------------------------------- 1 | ///#globals Foo FooBar bat CAVE 2 | 3 | if (FooBar && Foo) 4 | { 5 | Foo(FooBar, bat); 6 | } 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Comments/OnlyImportantComment.js: -------------------------------------------------------------------------------- 1 | /*! Copyright 2010 by Contoso Corp. All rights reserved */ 2 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Comments/TwoImportantComments.js: -------------------------------------------------------------------------------- 1 | /*! First Important Comment */ 2 | /*! Second Important Comment */ 3 | var a = 10; 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Comprehensions/GeneratorComp.js: -------------------------------------------------------------------------------- 1 | function test1() 2 | { 3 | for(var n in (for(x of [1, 2, 3, 4, 5]) if (x % 2) x * x)) 4 | { 5 | alert(n); 6 | } 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ConditionalCompilation/EndEOF.js: -------------------------------------------------------------------------------- 1 | //@cc_on 2 | //@if (@IsDebug) 3 | (function foo(bar) 4 | { 5 | alert(bar); 6 | })("ack"); 7 | 8 | // don't have a line-feed after the @end -- just end the file 9 | //@end -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ConditionalCompilation/StartWithSet.js: -------------------------------------------------------------------------------- 1 | @set @foo=(22/7) 2 | var pi = /*@foo @*/; 3 | 4 | @set @false=false 5 | var flag = /*@false@*/; 6 | alert(flag); 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ControlFlow/BreakLabel.js: -------------------------------------------------------------------------------- 1 | outer_block: { 2 | console.log('1'); 3 | break outer_block; // breaks out of both inner_block and outer_block 4 | console.log(':-('); // skipped 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ControlFlow/BreakNoLabel.js: -------------------------------------------------------------------------------- 1 | outer_block: { 2 | console.log('1'); 3 | break inner_block; // no such label 4 | console.log(':-('); // skipped 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/DebugNamespaces/EmptyIf.js: -------------------------------------------------------------------------------- 1 | // checking to see if the if-statement is removed entirely due to debug-stripping 2 | alpha; 3 | if (window.console) 4 | { 5 | console.log("Hi There!"); 6 | } 7 | beta; 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ArrayMatching.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#ArrayMatching 2 | var list = [ 1, 2, 3 ] 3 | var [ a, , b ] = list; 4 | [ b, a ] = [ a, b ] -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ClassInheritanceAssignment.js: -------------------------------------------------------------------------------- 1 | let b = class X extends Y { 2 | // Empty 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ConciseMethods.js: -------------------------------------------------------------------------------- 1 | var o = { 2 | foo() { 3 | return 1; 4 | } 5 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ConciseProperties.js: -------------------------------------------------------------------------------- 1 | var name = "tester"; 2 | var o = { 3 | name 4 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ConstDeclaration.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#Constants 2 | const f = 2; 3 | const g = 'abc'; 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/DefaultParameters.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#DefaultParameterValues 2 | function f (x, y = 7, z = 42) { 3 | return x + y + z; 4 | } 5 | 6 | f(1) === 50; 7 | let f2 = (x = 1) => x^2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/DestructuringAssignment.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#FailSoftDestructuring 2 | var list = [ 7, 42 ] 3 | var [ a = 1, b = 2, c = 3, d ] = list 4 | a === 7 5 | b === 42 6 | c === 3 7 | d === undefined -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ExpressionBodies.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#ExpressionBodies 2 | odds = evens.map(v => v + 1) 3 | pairs = evens.map(v => ({ even: v, odd: v + 1 })) 4 | nums = evens.map((v, i) => v + i) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ExpressionBodiesWithDestructuring.js: -------------------------------------------------------------------------------- 1 | tuples=evens.map(([v, i])=>v+i) -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/GeneratorMethods.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#GeneratorMethods 2 | class Clz { 3 | * bar () { 4 | } 5 | } 6 | let Obj = { 7 | * foo () { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/ObjectSpreadOperator.js: -------------------------------------------------------------------------------- 1 | const obj1 = { 2 | prop0: "val0", 3 | prop1: "val1" 4 | }; 5 | const obj2 = { 6 | ...obj1, 7 | prop2: "val2" 8 | }; 9 | 10 | const obj3 = { 11 | ...obj1, 12 | ...obj2 13 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/StatementBodies.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#StatementBodies 2 | nums.forEach(v => { 3 | if (v % 5 === 0) 4 | fives.push(v) 5 | }) 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2015/TaggedTemplates.js: -------------------------------------------------------------------------------- 1 | // http://es6-features.org/#CustomInterpolation 2 | get`http://example.com/foo?bar=${bar + baz}&quux=${quux}` -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2016/Exponent.js: -------------------------------------------------------------------------------- 1 | let x = 2 ** 5.1; 2 | let y = 3 ** x; 3 | let z = 2 ** 3 ** 4; 4 | 5 | let p = 5 + 2 ** 4; 6 | 7 | function r(a, b) { 8 | return a ** b; 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2016/ExponentAssign.js: -------------------------------------------------------------------------------- 1 | let y = 3 ** x; 2 | y **= 2 ** 1; 3 | 4 | 5 | let x = 5; 6 | x **= y ** x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2018/ForAwait.js: -------------------------------------------------------------------------------- 1 | (async function () { 2 | try { 3 | for await (let num of generator()) { 4 | console.log(num); 5 | } 6 | } catch (e) { 7 | console.log('caught', e); 8 | } 9 | })(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2018/SpreadOperator.js: -------------------------------------------------------------------------------- 1 | let object = { a: 1, b: 2 }; 2 | let objectClone = { ...object }; 3 | let otherObject = { c: 3, ...object }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2019/OptionalCatchBinding.js: -------------------------------------------------------------------------------- 1 | try { 2 | console.log(1); 3 | } catch { } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2020/GlobalThis.js: -------------------------------------------------------------------------------- 1 | function f(globalThis) { 2 | return globalThis * 2; 3 | } 4 | f(globalThis); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2020/NullCoalesce.js: -------------------------------------------------------------------------------- 1 | let p = null; 2 | let a = b ?? 'test'; 3 | let r = p ? p ?? true : false; 4 | let s = null ?? 3; 5 | let x = false ?? "string"; 6 | 7 | function y() { 8 | return 1 ?? x; 9 | } 10 | let z = y() + s; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2020/OptionalChaining.js: -------------------------------------------------------------------------------- 1 | let x = foo?.bar; 2 | let y = foo?.(); 3 | let z = foo?.()?.[a]; 4 | 5 | // should be treated as a conditional expression 6 | let p = foo?.3 : 0; 7 | 8 | a(x + y + z); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/LogicalAndAssign.js: -------------------------------------------------------------------------------- 1 | let x = false; 2 | x &&= y && true; 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/LogicalNullishAssign.js: -------------------------------------------------------------------------------- 1 | let x = null; 2 | x ??= y ?? true; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/LogicalOrAssign.js: -------------------------------------------------------------------------------- 1 | let x = false; 2 | x ||= y || true; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsBinary1.js: -------------------------------------------------------------------------------- 1 | let y = 0b1_0; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsBinary2.js: -------------------------------------------------------------------------------- 1 | let y = 0B1_0; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsDecimal1.js: -------------------------------------------------------------------------------- 1 | let y = 1_2.3; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsDecimal2.js: -------------------------------------------------------------------------------- 1 | let y = 1.2_3; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsDecimalAfter.js: -------------------------------------------------------------------------------- 1 | let x = 1._2; 2 | let y = x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsDecimalBefore.js: -------------------------------------------------------------------------------- 1 | let x = 1_.2; 2 | let y = x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsExponent1.js: -------------------------------------------------------------------------------- 1 | let y = 1_2e3; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsExponent2.js: -------------------------------------------------------------------------------- 1 | let y = 1e2_3; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsExponentAfter.js: -------------------------------------------------------------------------------- 1 | let x = 1e_2; 2 | let y = x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsExponentBefore.js: -------------------------------------------------------------------------------- 1 | let x = 1_e2; 2 | let y = x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsHex1.js: -------------------------------------------------------------------------------- 1 | let y = 0x1_2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsHex2.js: -------------------------------------------------------------------------------- 1 | let y = 0X1_2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsInteger.js: -------------------------------------------------------------------------------- 1 | let y = 1_2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsNoAdjacent.js: -------------------------------------------------------------------------------- 1 | let x = 1__2; 2 | let y = x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsNoTrailing.js: -------------------------------------------------------------------------------- 1 | let x = 1_; 2 | let y = x; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsOctal1.js: -------------------------------------------------------------------------------- 1 | let y = 0o1_2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ES2021/NumericSeparatorsOctal2.js: -------------------------------------------------------------------------------- 1 | let y = 0O1_2; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Encodings/SurrogateHighError.js: -------------------------------------------------------------------------------- 1 | 2 | // just a long high-surrogate -- error! 3 | var str = "\ud83d"; 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Encodings/SurrogateLowError.js: -------------------------------------------------------------------------------- 1 | // just a lone low-surrogate character - error! 2 | var str = "\ude80"; 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Encodings/UnicodeExtended.js: -------------------------------------------------------------------------------- 1 | // different representations of the same extended Unicode character 2 | var unicode = "🚀"; 3 | var escape = "\u{1F680}"; 4 | var surrogate = "\ud83d\ude80"; 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/FunctionCreation/ArrowConstructor.js: -------------------------------------------------------------------------------- 1 | // this needs to throw an error 2 | var obj = new ((a,b,c) => {this.sum = a + b + c;})(1,2,3); 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/FunctionCreation/ArrowFunctionAsArgument.js: -------------------------------------------------------------------------------- 1 | // in this case we parens shouldn't be removed 2 | hello(([ t ]) => t); 3 | hello(({ t }) => t); 4 | 5 | // only in this case it's allowed to remove parens 6 | hello((t) => t); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/FunctionCreation/BadSemicolon.js: -------------------------------------------------------------------------------- 1 | function foo(a, b, c) 2 | { 3 | alert(a); 4 | document.write( b + c ); 5 | } 6 | 7 | foo( "arf", "woof", "yip";); 8 | 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/FunctionCreation/Generator.js: -------------------------------------------------------------------------------- 1 |  2 | // generator function 3 | function * myGenerator( array, max ) 4 | { 5 | for(var item of array) 6 | { 7 | yield item; 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/FunctionCreation/NewFunction.js: -------------------------------------------------------------------------------- 1 | function Func(p1) 2 | { 3 | var add = new Function("x", "y", "return(x+y)"); 4 | add(2, 3); 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/FunctionCreation/VarArgList.js: -------------------------------------------------------------------------------- 1 | // the rest operator puts the rest of the parameters into an array with the given name. 2 | function foo(bar, ...ack) 3 | { 4 | return bar + ack.join( " and " ); 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/GlobalMethods/DOMElements.js: -------------------------------------------------------------------------------- 1 | function isElement(elem) 2 | { 3 | return elem instanceof HTMLElement; 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/GlobalMethods/Eval.js: -------------------------------------------------------------------------------- 1 | function Func(p1) 2 | { 3 | eval("var mydate = new Date();"); 4 | eval( function() {return "arf";} ); 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/GlobalMethods/GlobalObject.js: -------------------------------------------------------------------------------- 1 | var foo = NaN; // global constant 2 | var d = document; // global property 3 | 4 | moveTo( x, y ); // global method 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/GlobalMethods/SpecialEval.js: -------------------------------------------------------------------------------- 1 | x = (0, eval)('this'); 2 | y = (0, 1, eval)('this'); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/LexicalDeclarations/ConstAssign.js: -------------------------------------------------------------------------------- 1 | while(window.foo) 2 | { 3 | const fortyTwo = 42; 4 | fortyTwo += 2; 5 | ++fortyTwo; 6 | alert(fortyTwo); 7 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/LexicalDeclarations/LexFor.js: -------------------------------------------------------------------------------- 1 |  2 | // the ndx is declared lexically inside the for-statement 3 | for(let ndx = 0; ndx < 100; ++ndx) 4 | { 5 | alert(ndx); 6 | } 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/LexicalDeclarations/LexForIn.js: -------------------------------------------------------------------------------- 1 |  2 | var obj = {}; 3 | 4 | // the ndx is declared lexically inside the forIn-statement 5 | for(let ndx in obj) 6 | { 7 | alert(ndx); 8 | } 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Literals/ArrayLiteral.js: -------------------------------------------------------------------------------- 1 | var arr = [ 2 | 1, 3 | "two", 4 | function(){ return 3; }, 5 | 4 6 | ]; 7 | 8 | var empty = []; 9 | 10 | var nested = [ [1,2,3], [4,5,6], [7,8] ]; 11 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Literals/Boolean.js: -------------------------------------------------------------------------------- 1 | var t = true; 2 | var f = false; 3 | 4 | var a = true.toString(); 5 | var b = true["123"]; 6 | var c = true(false); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Literals/GetterSetter.js: -------------------------------------------------------------------------------- 1 | var o = { 2 | foo: 42, 3 | get val() {return this.foo;}, 4 | set val(v) {this.foo = v;} 5 | }; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Literals/LoneHighSurrogate.js: -------------------------------------------------------------------------------- 1 | // a high surrogate value not followed by a low-surrogate! 2 | var text = "\ud800"; 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Literals/LoneLowSurrogate.js: -------------------------------------------------------------------------------- 1 | // a low surrogate value not preceeded by a high-surrogate! 2 | var text = "\udc00"; 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Literals/TemplateLiteralsEscaped.js: -------------------------------------------------------------------------------- 1 | var a = new RegExp(`<[\\w-\\d]$`, "i"); 2 | a = new RegExp("<[\\w-\\d]$", "i"); 3 | 4 | var b = `\`this is \`${1} 5 | escaped\`${2}`; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Modules/BadExport.js: -------------------------------------------------------------------------------- 1 |  2 | // should not be exporting from a function 3 | function foo(bar) 4 | { 5 | var a = bar * bar; 6 | export {a as BarSquared}; 7 | return a; 8 | } 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Modules/ImportAssign.js: -------------------------------------------------------------------------------- 1 | // import a field from an external module 2 | import {foo} from "othermodule"; 3 | 4 | // should NOT be able to assign to it 5 | foo = 42; 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Modules/ImportRename.js: -------------------------------------------------------------------------------- 1 | function test1() 2 | { 3 | import { sum, pi } from "math"; 4 | console.log(sum(pi, pi)); 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Modules/NoExportExternal.js: -------------------------------------------------------------------------------- 1 |  2 | // import an external module 3 | import {arf} from "lib/testmodule"; 4 | arf("hey, there!"); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Modules/NoExportInline.js: -------------------------------------------------------------------------------- 1 | module "foo" 2 | { 3 | export function bar(txt) { alert("bar: " + txt); } 4 | export function bat(txt) { alert("bat: " + txt); } 5 | } 6 | 7 | 8 | import { arf } from "foo"; 9 | arf("one more time"); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Operators/AddressOf.js: -------------------------------------------------------------------------------- 1 | function foo(x, y) 2 | { 3 | return x - y; 4 | } 5 | 6 | var a = 10, b = 9; 7 | foo( &a, &(b.c) ); 8 | 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Preprocessor/SourceDirective.js: -------------------------------------------------------------------------------- 1 | /*/#source 10 1 foo.js 2 | this is the source directive */ 3 | 4 | 5 | foo(bar); 6 | 7 | ///#SoUrCe 5 42 fargo.htm 8 | bar(foo) 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Renaming/NoRename.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ResourceMerge/ResourceJS_res.js: -------------------------------------------------------------------------------- 1 | var Strings = { 2 | Message: "You called foo with ", 3 | Extra: "some other string we won't really need" 4 | }; 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ResourceMerge/Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify.Tests/TestData/JS/Input/ResourceMerge/Resources.resources -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ResourceMerge/StringsFooBar.js: -------------------------------------------------------------------------------- 1 | function foo() 2 | { 3 | var first = Strings.Foo.Bar.First; 4 | var not = Strings.Ack.Bar.Not; 5 | 6 | var second = Strings["Foo"].Bar["Second"]; 7 | return first + ' ' + second; 8 | } 9 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ScannerErrors/BadHexDigit.js: -------------------------------------------------------------------------------- 1 | // various number format errors that would cause scanner problems 2 | 3 | var badHex = 0xRT; 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ScannerErrors/StringEOF.js: -------------------------------------------------------------------------------- 1 | // unterminated string that ends with an EOF 2 | 3 | var str = "now is the time -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ScannerErrors/StringEOL.js: -------------------------------------------------------------------------------- 1 | // unterminated string on a line, but not EOF 2 | 3 | var un = "now is the time 4 | 5 | var forall = "good men"; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/ScannerErrors/UnexpectedNull.js: -------------------------------------------------------------------------------- 1 | var a = 10; 2 | 3 | alert(a); 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/SourceMap/.gitattributes: -------------------------------------------------------------------------------- 1 | # Because the test case expect to have CRLF, we force it here 2 | * eol=crlf 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/SourceMap/MapArgNotSpecified.js: -------------------------------------------------------------------------------- 1 | var i = 0; 2 | for (i = 0; i <= 100; i++) { 3 | if (i % 2 == 0) write(i); 4 | } 5 | 6 | function write(i) { 7 | document.write("The number is " + i); 8 | document.write("
"); 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/SourceMap/ScriptSharpMap.js: -------------------------------------------------------------------------------- 1 | alertOnTimeout(); 2 | 3 | function alertOnTimeout() { 4 | setTimeout("invokeAlert()", 3000); 5 | } 6 | 7 | function invokeAlert() { 8 | alert("Hello"); 9 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/SourceMap/SourceMapForMultipleFiles1.js: -------------------------------------------------------------------------------- 1 | function func1() { 2 | return 1; 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/SourceMap/SourceMapForMultipleFiles2.js: -------------------------------------------------------------------------------- 1 | function func2() { 2 | return 2; 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/SourceMap/SourceMapForMultipleFiles3.js: -------------------------------------------------------------------------------- 1 | function func3() { 2 | return 3; 3 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/StdIn/StdInTest.js: -------------------------------------------------------------------------------- 1 | function foo(cond,val) 2 | { 3 | if (cond) 4 | { 5 | return val; 6 | } 7 | else 8 | { 9 | return !val; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/StrictPartial1.js: -------------------------------------------------------------------------------- 1 | // partial wrapper for wrapping code 2 | +function(window, document) 3 | { 4 | if(window.console) { console.log("start"); } 5 | if (!window.foo) 6 | { 7 | 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/StrictPartial2.js: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | window.alert(document.location); 4 | 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/StrictPartial3.js: -------------------------------------------------------------------------------- 1 |  2 | } 3 | 4 | if(window.console) { console.log("end"); } 5 | }(window, document); 6 | // end -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/StrictSwitch1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function foo(bar) 4 | { 5 | "use strict"; 6 | alert("foo: " + bar); 7 | } 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/StrictSwitch2.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function bar(foo) 4 | { 5 | "use strict"; 6 | alert("bar: " + foo); 7 | } 8 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/UnknownGlobal.js: -------------------------------------------------------------------------------- 1 | function foo(bat) 2 | { 3 | "use strict"; 4 | bar = bat.cave || location.href; 5 | return ack(bar) + vat++; 6 | } 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Strict/With.js: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | with(location) 4 | { 5 | alert(href); 6 | } 7 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/IgnoreErrors.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var foo, bar = 10; 3 | myAlert($[msg] + bar); 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/NoBreakBreak.js: -------------------------------------------------------------------------------- 1 | break mylabel; 2 | next(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/NoBreakContinue.js: -------------------------------------------------------------------------------- 1 | continue mylabel; 2 | next(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/NoBreakPostDec.js: -------------------------------------------------------------------------------- 1 | fooBar--; 2 | f(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/NoBreakPostInc.js: -------------------------------------------------------------------------------- 1 | fooBar++; 2 | f(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/NoBreakReturn.js: -------------------------------------------------------------------------------- 1 | return new F(); -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Switch/NoBreakThrow.js: -------------------------------------------------------------------------------- 1 | throw new F(); 2 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Syntax/BOM.js: -------------------------------------------------------------------------------- 1 |  2 | // UNICODE byte-order marks are just whitespace 3 | var text ="now is the time"; 4 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/Syntax/MissingMemberRoot.js: -------------------------------------------------------------------------------- 1 |  2 | // the comma is a mistake that creates a syntax error 3 | $x.on("mousedown", function() {alert("down");}), 4 | .on("mouseup", function() {alert("up");}); 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/VarDecls/UnRefVar.js: -------------------------------------------------------------------------------- 1 | // parameter y is not referenced 2 | function foo(x, y) 3 | { 4 | // variable z is not referenced 5 | var z = 10; 6 | 7 | // reference parameter x 8 | alert(x); 9 | } 10 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/.gitattributes: -------------------------------------------------------------------------------- 1 | # Because the test case expect to have CRLF, we force it here 2 | * eol=crlf 3 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/EncInput1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify.Tests/TestData/JS/Input/XmlInput/EncInput1.js -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/EncInput2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify.Tests/TestData/JS/Input/XmlInput/EncInput2.js -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/Input1.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-color: ivory; 4 | color: tomato; 5 | } -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/Input1.js: -------------------------------------------------------------------------------- 1 | var foo = 10; -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/Input2.css: -------------------------------------------------------------------------------- 1 | a:hover 2 | { 3 | color:Red; 4 | } 5 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/Input2.js: -------------------------------------------------------------------------------- 1 | var bar = 42; 2 | function ack(queue) 3 | { 4 | alert(queue); 5 | } 6 | -------------------------------------------------------------------------------- /src/NUglify.Tests/TestData/JS/Input/XmlInput/Input3.js: -------------------------------------------------------------------------------- 1 | alert("last one"); -------------------------------------------------------------------------------- /src/NUglify/Html/HtmlScriptStyleElement.cs: -------------------------------------------------------------------------------- 1 | namespace NUglify.Html 2 | { 3 | public enum HtmlScriptStyleElement 4 | { 5 | NA = 0, 6 | Style = 1, 7 | Javascript = 2, 8 | JSON = 3 9 | } 10 | } -------------------------------------------------------------------------------- /src/NUglify/Html/HtmlTagDescriptor.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify/Html/HtmlTagDescriptor.cs -------------------------------------------------------------------------------- /src/NUglify/JavaScript/GlobalDefineEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NUglify.JavaScript 4 | { 5 | public class GlobalDefineEventArgs : EventArgs 6 | { 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/NUglify/JavaScript/NewModuleEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NUglify.JavaScript 4 | { 5 | public class NewModuleEventArgs : EventArgs 6 | { 7 | public string Module { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/NUglify/JavaScript/UpdateHint.cs: -------------------------------------------------------------------------------- 1 | namespace NUglify.JavaScript 2 | { 3 | public enum UpdateHint 4 | { 5 | None = 0, 6 | RegularExpression, 7 | TemplateLiteral, 8 | ReplacementToken, 9 | } 10 | } -------------------------------------------------------------------------------- /src/NUglify/key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trullock/NUglify/c2b3a4d3819f0d39a3f6bdc14a54264510de1083/src/NUglify/key.snk -------------------------------------------------------------------------------- /src/NUglifyApp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/NUglifyApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------