diff --git a/.editorconfig b/.editorconfig index eaf3fae3..a2962bd0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,13 +17,10 @@ indent_style = space indent_size = 2 insert_final_newline = true -[*.{xml,config,csproj,props,targets,nuspec}] +[*.{xml,config,slnx,csproj,props,targets,nuspec}] indent_style = space indent_size = 2 -[*.sln] -insert_final_newline = true - [*.{txt,md}] indent_style = space indent_size = unset diff --git a/.gitattributes b/.gitattributes index 4fce7533..9607807f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,7 +3,7 @@ # Custom for Visual Studio *.cs diff=csharp -*.sln merge=union +*.slnx merge=union *.csproj merge=union # Standard to msysgit diff --git a/CHANGELOG.md b/CHANGELOG.md index 2672f1d5..2d6090df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,100 @@ Change log ========== +## v3.33.1 - March 12, 2026 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.6.3 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.314 + +## v3.33.0 - March 10, 2026 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.6.2 + * In JavaScriptEngineSwitcher.NiL: + * NiL.JS was updated to version 2.6.1721 + * Added support for .NET Standard 2.1 + * In JavaScriptEngineSwitcher.Yantra: + * YantraJS was updated to version 1.2.306 + * Added support for .NET 8 + +## v3.32.0 - February 25, 2026 + * In JavaScriptEngineSwitcher.NiL: + * NiL.JS was updated to version 2.6.1714 + * No longer supports a .NET Core App 3.1 and .NET 6 + * Added support for .NET 10 + +## v3.31.0 - February 23, 2026 + * Performed a migration to the modern C# null/not-null checks + * Added support for .NET 10 + * In the `lock` statements for .NET 9 and 10 targets now uses a instances of the `System.Threading.Lock` class + * Reduced a memory allocation by using collection expressions + * In JavaScriptEngineSwitcher.ChakraCore: + * ChakraCore was updated to version of February 19, 2026 + * The value of a read-only field in an embedded object or type can no longer be changed + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.6.0 + * In JavaScriptEngineSwitcher.Msie added support for the MSIE JavaScript Engine version 3.3.1 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.301 + +## v3.30.4 - January 11, 2026 + * In JavaScriptEngineSwitcher.ChakraCore optimized a memory usage in the `ReflectionHelpers.GetBestFitMethod` method + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.5.0 + +## v3.30.3 - December 22, 2025 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.4.2 + * In JavaScriptEngineSwitcher.NiL added support for the NiL.JS version 2.6.1712 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.299 + +## v3.30.2 - July 15, 2025 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.4.0 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.286 + +## v3.30.1 - July 1, 2025 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.3.0 + +## v3.30.0 - June 16, 2025 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.2.2 + * In JavaScriptEngineSwitcher.NiL: + * NiL.JS was updated to version 2.6.1700 + * No longer supports a .NET 5 and 7 + * Added support for .NET 9 + +## v3.29.1 - March 14, 2025 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.2.1 + * In JavaScriptEngineSwitcher.V8 performed a migration to a modern API for pre-compilation of scripts + +## v3.29.0 - March 8, 2025 + * In JavaScriptEngineSwitcher.Jurassic added support for the Jurassic version of February 4, 2025 + * In JavaScriptEngineSwitcher.V8: + * Microsoft ClearScript.V8 was updated to version 7.5 (support of the V8 version 13.3.415.23) + * No longer supports a .NET Framework 4.5 + * Added support for .NET Framework 4.6.2 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.282 + +## v3.28.0 - January 29, 2025 + * In JavaScriptEngineSwitcher.Jint: + * Jint was updated to version 4.2.0 + * No longer supports a .NET 6 + +## v3.27.3 - December 18, 2024 + * In JavaScriptEngineSwitcher.ChakraCore added support for the ChakraCore version of August 1, 2024 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.1.0 + * In JavaScriptEngineSwitcher.Jurassic added support for the Jurassic version of November 22, 2024 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.246 + +## v3.27.2 - September 1, 2024 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.0.2 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.225 + +## v3.27.1 - August 20, 2024 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.0.1 + * In JavaScriptEngineSwitcher.Yantra added support for the YantraJS version 1.2.218 + +## v3.27.0 - July 24, 2024 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 4.0.0 + +## v3.26.1 - June 18, 2024 + * In JavaScriptEngineSwitcher.Jint added support for the Jint version 3.1.3 + * In JavaScriptEngineSwitcher.NiL: + * NiL.JS was updated to version 2.5.1684 + * Added support for .NET 8 + ## v3.26.0 - April 22, 2024 * In JavaScriptEngineSwitcher.ChakraCore: * ChakraCore was updated to version of April 21, 2024 diff --git a/Directory.Packages.props b/Directory.Packages.props index 0243d321..f66000d3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,18 +1,18 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JavaScriptEngineSwitcher.NoSamples.sln b/JavaScriptEngineSwitcher.NoSamples.sln deleted file mode 100644 index c83f1423..00000000 --- a/JavaScriptEngineSwitcher.NoSamples.sln +++ /dev/null @@ -1,227 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33502.453 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{19575E10-6B8E-4CF0-B7D2-898FFF47E157}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - CHANGELOG.md = CHANGELOG.md - global.json = global.json - LICENSE.txt = LICENSE.txt - README.md = README.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{3FE10516-C056-4337-9C9A-5FD592430F87}" - ProjectSection(SolutionItems) = preProject - build\common.props = build\common.props - build\initialize-standard-nuspec-properties.targets = build\initialize-standard-nuspec-properties.targets - build\Key.snk = build\Key.snk - build\net40-client-target.props = build\net40-client-target.props - build\nuget-common.props = build\nuget-common.props - build\nuget-for-dotnet-lib.props = build\nuget-for-dotnet-lib.props - build\nuget-for-native-lib.props = build\nuget-for-native-lib.props - build\strong-name-signing.props = build\strong-name-signing.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "licenses", "licenses", "{4AB5950E-3FA8-4A77-A067-F325BFD80537}" - ProjectSection(SolutionItems) = preProject - Licenses\advanced-string-builder-license.txt = Licenses\advanced-string-builder-license.txt - Licenses\chakra-core-license.txt = Licenses\chakra-core-license.txt - Licenses\chakra-samples-license.txt = Licenses\chakra-samples-license.txt - Licenses\clearscript-license.txt = Licenses\clearscript-license.txt - Licenses\jering-javascript-nodejs-license.txt = Licenses\jering-javascript-nodejs-license.txt - Licenses\jint-license.txt = Licenses\jint-license.txt - Licenses\jsrt-dotnet-license.txt = Licenses\jsrt-dotnet-license.txt - Licenses\jurassic-license.txt = Licenses\jurassic-license.txt - Licenses\microsoft-dotnet-arcade-sdk-license.txt = Licenses\microsoft-dotnet-arcade-sdk-license.txt - Licenses\msie-javascript-engine-license.txt = Licenses\msie-javascript-engine-license.txt - Licenses\nil-license.txt = Licenses\nil-license.txt - Licenses\nodejs-license.txt = Licenses\nodejs-license.txt - Licenses\polyfills-for-old-dot-net-license.txt = Licenses\polyfills-for-old-dot-net-license.txt - Licenses\v8-license.txt = Licenses\v8-license.txt - Licenses\vroomjs-core-license.txt = Licenses\vroomjs-core-license.txt - Licenses\yantra-license.txt = Licenses\yantra-license.txt - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0C281F46-F1D2-4A1C-8560-375EDA65D680}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{53B43213-2E66-42C2-8476-600A2FD2DA75}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Core", "src\JavaScriptEngineSwitcher.Core\JavaScriptEngineSwitcher.Core.csproj", "{13559975-F99D-4B93-BF46-227C0B6E0DFB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Extensions.MsDependencyInjection", "src\JavaScriptEngineSwitcher.Extensions.MsDependencyInjection\JavaScriptEngineSwitcher.Extensions.MsDependencyInjection.csproj", "{5B693A49-BEC2-4532-ADFE-80C4AA930E27}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Msie", "src\JavaScriptEngineSwitcher.Msie\JavaScriptEngineSwitcher.Msie.csproj", "{B3C4AA95-2227-47DD-B58C-22FA589CB28D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8", "src\JavaScriptEngineSwitcher.V8\JavaScriptEngineSwitcher.V8.csproj", "{C24E1F3C-5680-463A-8703-B9F40BCDAC77}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.win-x86", "src\JavaScriptEngineSwitcher.V8.Native.win-x86\JavaScriptEngineSwitcher.V8.Native.win-x86.csproj", "{1739A011-164B-4227-B540-01BAD61F17C5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.win-x64", "src\JavaScriptEngineSwitcher.V8.Native.win-x64\JavaScriptEngineSwitcher.V8.Native.win-x64.csproj", "{4FB64080-817F-468A-B92C-F63B46E6D85F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.linux-x64", "src\JavaScriptEngineSwitcher.V8.Native.linux-x64\JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj", "{D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.osx-x64", "src\JavaScriptEngineSwitcher.V8.Native.osx-x64\JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj", "{4B727E90-AE52-41DD-B704-28A00196052C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jurassic", "src\JavaScriptEngineSwitcher.Jurassic\JavaScriptEngineSwitcher.Jurassic.csproj", "{D31B5A77-8018-4D76-B372-325564385B2D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jint", "src\JavaScriptEngineSwitcher.Jint\JavaScriptEngineSwitcher.Jint.csproj", "{22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore", "src\JavaScriptEngineSwitcher.ChakraCore\JavaScriptEngineSwitcher.ChakraCore.csproj", "{2EFFFC6B-E642-477F-B537-4241EBD93410}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-x86", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-x86\JavaScriptEngineSwitcher.ChakraCore.Native.win-x86.csproj", "{F676D869-5715-46B0-A118-A162D9C9DEC6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.csproj", "{D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj", "{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj", "{304EEE7F-005D-4335-80AB-DB29025740B1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64\JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj", "{FF77615B-4182-4BE7-AE2B-0F9F75198490}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64\JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.csproj", "{E14C4086-9877-4658-AE39-6313039A9076}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Vroom", "src\JavaScriptEngineSwitcher.Vroom\JavaScriptEngineSwitcher.Vroom.csproj", "{238D7E69-7052-4DFC-83EF-79D3D124C12B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.NiL", "src\JavaScriptEngineSwitcher.NiL\JavaScriptEngineSwitcher.NiL.csproj", "{F0BF7975-2E8A-4EC8-8DAA-760A4302F419}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Node", "src\JavaScriptEngineSwitcher.Node\JavaScriptEngineSwitcher.Node.csproj", "{89F9DDDD-5236-4D9A-99E4-3C1358B81149}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Yantra", "src\JavaScriptEngineSwitcher.Yantra\JavaScriptEngineSwitcher.Yantra.csproj", "{897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Benchmarks", "test\JavaScriptEngineSwitcher.Benchmarks\JavaScriptEngineSwitcher.Benchmarks.csproj", "{24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Tests", "test\JavaScriptEngineSwitcher.Tests\JavaScriptEngineSwitcher.Tests.csproj", "{E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Release|Any CPU.Build.0 = Release|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Release|Any CPU.Build.0 = Release|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Release|Any CPU.Build.0 = Release|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Release|Any CPU.Build.0 = Release|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Release|Any CPU.Build.0 = Release|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Release|Any CPU.Build.0 = Release|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.Build.0 = Release|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.Build.0 = Release|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Release|Any CPU.Build.0 = Release|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Release|Any CPU.Build.0 = Release|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Release|Any CPU.Build.0 = Release|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Release|Any CPU.Build.0 = Release|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Release|Any CPU.Build.0 = Release|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.Build.0 = Release|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.Build.0 = Release|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Release|Any CPU.Build.0 = Release|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Release|Any CPU.Build.0 = Release|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Release|Any CPU.Build.0 = Release|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Release|Any CPU.Build.0 = Release|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Release|Any CPU.Build.0 = Release|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Release|Any CPU.Build.0 = Release|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Release|Any CPU.Build.0 = Release|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {13559975-F99D-4B93-BF46-227C0B6E0DFB} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {5B693A49-BEC2-4532-ADFE-80C4AA930E27} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {B3C4AA95-2227-47DD-B58C-22FA589CB28D} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {C24E1F3C-5680-463A-8703-B9F40BCDAC77} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {1739A011-164B-4227-B540-01BAD61F17C5} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {4FB64080-817F-468A-B92C-F63B46E6D85F} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {4B727E90-AE52-41DD-B704-28A00196052C} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {D31B5A77-8018-4D76-B372-325564385B2D} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {2EFFFC6B-E642-477F-B537-4241EBD93410} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {F676D869-5715-46B0-A118-A162D9C9DEC6} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {304EEE7F-005D-4335-80AB-DB29025740B1} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {FF77615B-4182-4BE7-AE2B-0F9F75198490} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {E14C4086-9877-4658-AE39-6313039A9076} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {238D7E69-7052-4DFC-83EF-79D3D124C12B} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {89F9DDDD-5236-4D9A-99E4-3C1358B81149} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE} = {53B43213-2E66-42C2-8476-600A2FD2DA75} - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF} = {53B43213-2E66-42C2-8476-600A2FD2DA75} - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8184BE59-ACBC-4CD1-9419-D59A0FAC6131} - EndGlobalSection -EndGlobal diff --git a/JavaScriptEngineSwitcher.NoSamples.slnx b/JavaScriptEngineSwitcher.NoSamples.slnx new file mode 100644 index 00000000..68112f6b --- /dev/null +++ b/JavaScriptEngineSwitcher.NoSamples.slnx @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JavaScriptEngineSwitcher.sln b/JavaScriptEngineSwitcher.sln deleted file mode 100644 index 4df069e7..00000000 --- a/JavaScriptEngineSwitcher.sln +++ /dev/null @@ -1,323 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31912.275 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{19575E10-6B8E-4CF0-B7D2-898FFF47E157}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - CHANGELOG.md = CHANGELOG.md - global.json = global.json - LICENSE.txt = LICENSE.txt - README.md = README.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{3FE10516-C056-4337-9C9A-5FD592430F87}" - ProjectSection(SolutionItems) = preProject - build\common.props = build\common.props - build\initialize-standard-nuspec-properties.targets = build\initialize-standard-nuspec-properties.targets - build\Key.snk = build\Key.snk - build\net40-client-target.props = build\net40-client-target.props - build\nuget-common.props = build\nuget-common.props - build\nuget-for-dotnet-lib.props = build\nuget-for-dotnet-lib.props - build\nuget-for-native-lib.props = build\nuget-for-native-lib.props - build\strong-name-signing.props = build\strong-name-signing.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "licenses", "licenses", "{4AB5950E-3FA8-4A77-A067-F325BFD80537}" - ProjectSection(SolutionItems) = preProject - Licenses\advanced-string-builder-license.txt = Licenses\advanced-string-builder-license.txt - Licenses\chakra-core-license.txt = Licenses\chakra-core-license.txt - Licenses\chakra-samples-license.txt = Licenses\chakra-samples-license.txt - Licenses\clearscript-license.txt = Licenses\clearscript-license.txt - Licenses\jering-javascript-nodejs-license.txt = Licenses\jering-javascript-nodejs-license.txt - Licenses\jint-license.txt = Licenses\jint-license.txt - Licenses\jsrt-dotnet-license.txt = Licenses\jsrt-dotnet-license.txt - Licenses\jurassic-license.txt = Licenses\jurassic-license.txt - Licenses\microsoft-dotnet-arcade-sdk-license.txt = Licenses\microsoft-dotnet-arcade-sdk-license.txt - Licenses\msie-javascript-engine-license.txt = Licenses\msie-javascript-engine-license.txt - Licenses\nil-license.txt = Licenses\nil-license.txt - Licenses\nodejs-license.txt = Licenses\nodejs-license.txt - Licenses\polyfills-for-old-dot-net-license.txt = Licenses\polyfills-for-old-dot-net-license.txt - Licenses\v8-license.txt = Licenses\v8-license.txt - Licenses\vroomjs-core-license.txt = Licenses\vroomjs-core-license.txt - Licenses\yantra-license.txt = Licenses\yantra-license.txt - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0C281F46-F1D2-4A1C-8560-375EDA65D680}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{53B43213-2E66-42C2-8476-600A2FD2DA75}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E5989CB5-AACE-4D35-A8EE-26942F140DA3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedData", "SharedData", "{C5173D1C-5284-4FD5-9E0D-C7FD0DC8E029}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "text-content", "text-content", "{F8CC9C7C-656D-4A76-A912-D5708009DD7C}" - ProjectSection(SolutionItems) = preProject - samples\SharedData\text-content\contact.html = samples\SharedData\text-content\contact.html - samples\SharedData\text-content\index.html = samples\SharedData\text-content\index.html - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Core", "src\JavaScriptEngineSwitcher.Core\JavaScriptEngineSwitcher.Core.csproj", "{13559975-F99D-4B93-BF46-227C0B6E0DFB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Extensions.MsDependencyInjection", "src\JavaScriptEngineSwitcher.Extensions.MsDependencyInjection\JavaScriptEngineSwitcher.Extensions.MsDependencyInjection.csproj", "{5B693A49-BEC2-4532-ADFE-80C4AA930E27}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Msie", "src\JavaScriptEngineSwitcher.Msie\JavaScriptEngineSwitcher.Msie.csproj", "{B3C4AA95-2227-47DD-B58C-22FA589CB28D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8", "src\JavaScriptEngineSwitcher.V8\JavaScriptEngineSwitcher.V8.csproj", "{C24E1F3C-5680-463A-8703-B9F40BCDAC77}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.win-x86", "src\JavaScriptEngineSwitcher.V8.Native.win-x86\JavaScriptEngineSwitcher.V8.Native.win-x86.csproj", "{1739A011-164B-4227-B540-01BAD61F17C5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.win-x64", "src\JavaScriptEngineSwitcher.V8.Native.win-x64\JavaScriptEngineSwitcher.V8.Native.win-x64.csproj", "{4FB64080-817F-468A-B92C-F63B46E6D85F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.linux-x64", "src\JavaScriptEngineSwitcher.V8.Native.linux-x64\JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj", "{D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.osx-x64", "src\JavaScriptEngineSwitcher.V8.Native.osx-x64\JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj", "{4B727E90-AE52-41DD-B704-28A00196052C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jurassic", "src\JavaScriptEngineSwitcher.Jurassic\JavaScriptEngineSwitcher.Jurassic.csproj", "{D31B5A77-8018-4D76-B372-325564385B2D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jint", "src\JavaScriptEngineSwitcher.Jint\JavaScriptEngineSwitcher.Jint.csproj", "{22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore", "src\JavaScriptEngineSwitcher.ChakraCore\JavaScriptEngineSwitcher.ChakraCore.csproj", "{2EFFFC6B-E642-477F-B537-4241EBD93410}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-x86", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-x86\JavaScriptEngineSwitcher.ChakraCore.Native.win-x86.csproj", "{F676D869-5715-46B0-A118-A162D9C9DEC6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64\JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.csproj", "{D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj", "{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj", "{304EEE7F-005D-4335-80AB-DB29025740B1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64\JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj", "{FF77615B-4182-4BE7-AE2B-0F9F75198490}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64\JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.csproj", "{E14C4086-9877-4658-AE39-6313039A9076}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Vroom", "src\JavaScriptEngineSwitcher.Vroom\JavaScriptEngineSwitcher.Vroom.csproj", "{238D7E69-7052-4DFC-83EF-79D3D124C12B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.NiL", "src\JavaScriptEngineSwitcher.NiL\JavaScriptEngineSwitcher.NiL.csproj", "{F0BF7975-2E8A-4EC8-8DAA-760A4302F419}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Node", "src\JavaScriptEngineSwitcher.Node\JavaScriptEngineSwitcher.Node.csproj", "{89F9DDDD-5236-4D9A-99E4-3C1358B81149}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Yantra", "src\JavaScriptEngineSwitcher.Yantra\JavaScriptEngineSwitcher.Yantra.csproj", "{897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Benchmarks", "test\JavaScriptEngineSwitcher.Benchmarks\JavaScriptEngineSwitcher.Benchmarks.csproj", "{24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Tests", "test\JavaScriptEngineSwitcher.Tests\JavaScriptEngineSwitcher.Tests.csproj", "{E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.Resources", "samples\JavaScriptEngineSwitcher.Sample.Resources\JavaScriptEngineSwitcher.Sample.Resources.csproj", "{62F0C0AD-15BC-42CE-9BD2-49F506FEAA54}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.Logic", "samples\JavaScriptEngineSwitcher.Sample.Logic\JavaScriptEngineSwitcher.Sample.Logic.csproj", "{C434E1B5-0463-4E58-8336-87F822D07B41}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4", "samples\JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4\JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4.csproj", "{8124DF18-4A0B-4648-8B90-4A6D3E4EF2F3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure\JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.csproj", "{98839644-D3CB-4CA0-A320-49286A7770B5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1\JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj", "{C790AD7F-55C6-4106-8D8C-8F901B7FF245}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1\JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj", "{5CA92021-B75A-40AF-B5AA-500BAF76B4D6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21\JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj", "{0342791E-6390-4F97-9163-5CE02E4CFF07}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31\JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj", "{D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5\JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5.csproj", "{189376C9-49DA-4A12-9C78-CE39E8EC7731}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6\JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6.csproj", "{58321699-3715-4CA7-8036-A9F26E4C93F3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7\JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7.csproj", "{923B1463-910F-4542-8E68-29F36A9DB508}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8", "samples\JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8\JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8.csproj", "{4E7BC7EF-5982-4A59-9283-05D158E637E2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13559975-F99D-4B93-BF46-227C0B6E0DFB}.Release|Any CPU.Build.0 = Release|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5B693A49-BEC2-4532-ADFE-80C4AA930E27}.Release|Any CPU.Build.0 = Release|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3C4AA95-2227-47DD-B58C-22FA589CB28D}.Release|Any CPU.Build.0 = Release|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C24E1F3C-5680-463A-8703-B9F40BCDAC77}.Release|Any CPU.Build.0 = Release|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1739A011-164B-4227-B540-01BAD61F17C5}.Release|Any CPU.Build.0 = Release|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4FB64080-817F-468A-B92C-F63B46E6D85F}.Release|Any CPU.Build.0 = Release|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.Build.0 = Release|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.Build.0 = Release|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D31B5A77-8018-4D76-B372-325564385B2D}.Release|Any CPU.Build.0 = Release|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}.Release|Any CPU.Build.0 = Release|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2EFFFC6B-E642-477F-B537-4241EBD93410}.Release|Any CPU.Build.0 = Release|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F676D869-5715-46B0-A118-A162D9C9DEC6}.Release|Any CPU.Build.0 = Release|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5}.Release|Any CPU.Build.0 = Release|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.Build.0 = Release|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.Build.0 = Release|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF77615B-4182-4BE7-AE2B-0F9F75198490}.Release|Any CPU.Build.0 = Release|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E14C4086-9877-4658-AE39-6313039A9076}.Release|Any CPU.Build.0 = Release|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {238D7E69-7052-4DFC-83EF-79D3D124C12B}.Release|Any CPU.Build.0 = Release|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419}.Release|Any CPU.Build.0 = Release|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89F9DDDD-5236-4D9A-99E4-3C1358B81149}.Release|Any CPU.Build.0 = Release|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB}.Release|Any CPU.Build.0 = Release|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE}.Release|Any CPU.Build.0 = Release|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Release|Any CPU.Build.0 = Release|Any CPU - {62F0C0AD-15BC-42CE-9BD2-49F506FEAA54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62F0C0AD-15BC-42CE-9BD2-49F506FEAA54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62F0C0AD-15BC-42CE-9BD2-49F506FEAA54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62F0C0AD-15BC-42CE-9BD2-49F506FEAA54}.Release|Any CPU.Build.0 = Release|Any CPU - {C434E1B5-0463-4E58-8336-87F822D07B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C434E1B5-0463-4E58-8336-87F822D07B41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C434E1B5-0463-4E58-8336-87F822D07B41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C434E1B5-0463-4E58-8336-87F822D07B41}.Release|Any CPU.Build.0 = Release|Any CPU - {8124DF18-4A0B-4648-8B90-4A6D3E4EF2F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8124DF18-4A0B-4648-8B90-4A6D3E4EF2F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8124DF18-4A0B-4648-8B90-4A6D3E4EF2F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8124DF18-4A0B-4648-8B90-4A6D3E4EF2F3}.Release|Any CPU.Build.0 = Release|Any CPU - {C790AD7F-55C6-4106-8D8C-8F901B7FF245}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C790AD7F-55C6-4106-8D8C-8F901B7FF245}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C790AD7F-55C6-4106-8D8C-8F901B7FF245}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C790AD7F-55C6-4106-8D8C-8F901B7FF245}.Release|Any CPU.Build.0 = Release|Any CPU - {5CA92021-B75A-40AF-B5AA-500BAF76B4D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5CA92021-B75A-40AF-B5AA-500BAF76B4D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5CA92021-B75A-40AF-B5AA-500BAF76B4D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5CA92021-B75A-40AF-B5AA-500BAF76B4D6}.Release|Any CPU.Build.0 = Release|Any CPU - {0342791E-6390-4F97-9163-5CE02E4CFF07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0342791E-6390-4F97-9163-5CE02E4CFF07}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0342791E-6390-4F97-9163-5CE02E4CFF07}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0342791E-6390-4F97-9163-5CE02E4CFF07}.Release|Any CPU.Build.0 = Release|Any CPU - {D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Release|Any CPU.Build.0 = Release|Any CPU - {189376C9-49DA-4A12-9C78-CE39E8EC7731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {189376C9-49DA-4A12-9C78-CE39E8EC7731}.Debug|Any CPU.Build.0 = Debug|Any CPU - {189376C9-49DA-4A12-9C78-CE39E8EC7731}.Release|Any CPU.ActiveCfg = Release|Any CPU - {189376C9-49DA-4A12-9C78-CE39E8EC7731}.Release|Any CPU.Build.0 = Release|Any CPU - {58321699-3715-4CA7-8036-A9F26E4C93F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58321699-3715-4CA7-8036-A9F26E4C93F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58321699-3715-4CA7-8036-A9F26E4C93F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58321699-3715-4CA7-8036-A9F26E4C93F3}.Release|Any CPU.Build.0 = Release|Any CPU - {923B1463-910F-4542-8E68-29F36A9DB508}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {923B1463-910F-4542-8E68-29F36A9DB508}.Debug|Any CPU.Build.0 = Debug|Any CPU - {923B1463-910F-4542-8E68-29F36A9DB508}.Release|Any CPU.ActiveCfg = Release|Any CPU - {923B1463-910F-4542-8E68-29F36A9DB508}.Release|Any CPU.Build.0 = Release|Any CPU - {98839644-D3CB-4CA0-A320-49286A7770B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {98839644-D3CB-4CA0-A320-49286A7770B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {98839644-D3CB-4CA0-A320-49286A7770B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {98839644-D3CB-4CA0-A320-49286A7770B5}.Release|Any CPU.Build.0 = Release|Any CPU - {4E7BC7EF-5982-4A59-9283-05D158E637E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E7BC7EF-5982-4A59-9283-05D158E637E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E7BC7EF-5982-4A59-9283-05D158E637E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E7BC7EF-5982-4A59-9283-05D158E637E2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {C5173D1C-5284-4FD5-9E0D-C7FD0DC8E029} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {F8CC9C7C-656D-4A76-A912-D5708009DD7C} = {C5173D1C-5284-4FD5-9E0D-C7FD0DC8E029} - {13559975-F99D-4B93-BF46-227C0B6E0DFB} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {5B693A49-BEC2-4532-ADFE-80C4AA930E27} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {B3C4AA95-2227-47DD-B58C-22FA589CB28D} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {C24E1F3C-5680-463A-8703-B9F40BCDAC77} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {1739A011-164B-4227-B540-01BAD61F17C5} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {4FB64080-817F-468A-B92C-F63B46E6D85F} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {4B727E90-AE52-41DD-B704-28A00196052C} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {D31B5A77-8018-4D76-B372-325564385B2D} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {2EFFFC6B-E642-477F-B537-4241EBD93410} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {F676D869-5715-46B0-A118-A162D9C9DEC6} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {304EEE7F-005D-4335-80AB-DB29025740B1} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {FF77615B-4182-4BE7-AE2B-0F9F75198490} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {E14C4086-9877-4658-AE39-6313039A9076} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {238D7E69-7052-4DFC-83EF-79D3D124C12B} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {F0BF7975-2E8A-4EC8-8DAA-760A4302F419} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {89F9DDDD-5236-4D9A-99E4-3C1358B81149} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {897E4EFA-C8F5-4980-BBD0-2EA7B920B2EB} = {0C281F46-F1D2-4A1C-8560-375EDA65D680} - {24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE} = {53B43213-2E66-42C2-8476-600A2FD2DA75} - {E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF} = {53B43213-2E66-42C2-8476-600A2FD2DA75} - {62F0C0AD-15BC-42CE-9BD2-49F506FEAA54} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {C434E1B5-0463-4E58-8336-87F822D07B41} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {8124DF18-4A0B-4648-8B90-4A6D3E4EF2F3} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {C790AD7F-55C6-4106-8D8C-8F901B7FF245} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {5CA92021-B75A-40AF-B5AA-500BAF76B4D6} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {0342791E-6390-4F97-9163-5CE02E4CFF07} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {189376C9-49DA-4A12-9C78-CE39E8EC7731} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {58321699-3715-4CA7-8036-A9F26E4C93F3} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {923B1463-910F-4542-8E68-29F36A9DB508} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {98839644-D3CB-4CA0-A320-49286A7770B5} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - {4E7BC7EF-5982-4A59-9283-05D158E637E2} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8184BE59-ACBC-4CD1-9419-D59A0FAC6131} - EndGlobalSection -EndGlobal diff --git a/JavaScriptEngineSwitcher.slnx b/JavaScriptEngineSwitcher.slnx new file mode 100644 index 00000000..839899a5 --- /dev/null +++ b/JavaScriptEngineSwitcher.slnx @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 105a2500..4cfc5d38 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru Apache License Version 2.0, January 2004 diff --git a/Licenses/advanced-string-builder-license.txt b/Licenses/advanced-string-builder-license.txt index 3598e8b2..359c73a8 100644 --- a/Licenses/advanced-string-builder-license.txt +++ b/Licenses/advanced-string-builder-license.txt @@ -1,4 +1,4 @@ - Copyright (c) 2018-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2018-2026 Andrey Taritsyn - http://www.taritsyn.ru Apache License Version 2.0, January 2004 diff --git a/Licenses/msie-javascript-engine-license.txt b/Licenses/msie-javascript-engine-license.txt index 6e8f77b1..97d57b40 100644 --- a/Licenses/msie-javascript-engine-license.txt +++ b/Licenses/msie-javascript-engine-license.txt @@ -1,4 +1,4 @@ - Copyright (c) 2012-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2012-2026 Andrey Taritsyn - http://www.taritsyn.ru Apache License Version 2.0, January 2004 diff --git a/Licenses/polyfills-for-old-dot-net-license.txt b/Licenses/polyfills-for-old-dot-net-license.txt index 3598e8b2..359c73a8 100644 --- a/Licenses/polyfills-for-old-dot-net-license.txt +++ b/Licenses/polyfills-for-old-dot-net-license.txt @@ -1,4 +1,4 @@ - Copyright (c) 2018-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2018-2026 Andrey Taritsyn - http://www.taritsyn.ru Apache License Version 2.0, January 2004 diff --git a/README.md b/README.md index d4829c96..0a5648c4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ JavaScript Engine Switcher [![NuGet version](http://img.shields.io/nuget/v/JavaScriptEngineSwitcher.Core.svg)](https://www.nuget.org/packages/JavaScriptEngineSwitcher.Core/) [![Download count](https://img.shields.io/nuget/dt/JavaScriptEngineSwitcher.Core.svg)](https://www.nuget.org/packages/JavaScriptEngineSwitcher.Core/) ========================== -JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines ([ChakraCore](https://github.com/chakra-core/ChakraCore), [Jint](https://github.com/sebastienros/jint), [Jurassic](https://github.com/paulbartrum/jurassic), [MSIE JavaScript Engine for .NET](https://github.com/Taritsyn/MsieJavaScriptEngine), [NiL.JS](https://github.com/nilproject/NiL.JS), [Jering.Javascript.NodeJS](https://github.com/JeringTech/Javascript.NodeJS), [Microsoft ClearScript.V8](https://github.com/Microsoft/ClearScript), [VroomJs](https://github.com/pauldotknopf/vroomjs-core) and [YantraJS](https://yantrajs.com)). +JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines ([ChakraCore](https://github.com/chakra-core/ChakraCore), [Jint](https://github.com/sebastienros/jint), [Jurassic](https://github.com/paulbartrum/jurassic), [MSIE JavaScript Engine for .NET](https://github.com/Taritsyn/MsieJavaScriptEngine), [NiL.JS](https://github.com/nilproject/NiL.JS), [Jering.Javascript.NodeJS](https://github.com/JeringTech/Javascript.NodeJS), [Microsoft ClearScript.V8](https://github.com/Microsoft/ClearScript), [VroomJs](https://github.com/pauldotknopf/vroomjs-core) and [YantraJS](https://github.com/yantrajs/yantra)). This library allows you to quickly and easily switch to using of another JavaScript engine. The supported .NET types are as follows: @@ -16,23 +16,23 @@ The supported .NET types are as follows: This library can be installed through NuGet: ### Core - * [JS Engine Switcher: Core](http://nuget.org/packages/JavaScriptEngineSwitcher.Core) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Standard 1.3 and .NET Standard 2.0) - * [JS Engine Switcher: MS Dependency Injection](http://nuget.org/packages/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection) (supports .NET Framework 4.5, .NET Standard 1.3 and .NET Standard 2.0) + * [JS Engine Switcher: Core](http://nuget.org/packages/JavaScriptEngineSwitcher.Core) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Standard 1.3, .NET Standard 2.0 and .NET 10) + * [JS Engine Switcher: MS Dependency Injection](http://nuget.org/packages/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection) (supports .NET Framework 4.5, .NET Standard 1.3, .NET Standard 2.0 and .NET 10) ### JS engines - * [JS Engine Switcher: ChakraCore](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Framework 4.7.1, .NET Standard 1.3, .NET Standard 2.0 and .NET Standard 2.1) + * [JS Engine Switcher: ChakraCore](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Framework 4.7.1, .NET Standard 1.3, .NET Standard 2.0, .NET Standard 2.1 and .NET 10) * [Windows (x86)](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86) * [Windows (x64)](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64) * [Windows (ARM)](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm) * [Windows (ARM64)](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64) * [Linux (x64)](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64) * [OS X (x64)](http://nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64) - * [JS Engine Switcher: Jint](http://nuget.org/packages/JavaScriptEngineSwitcher.Jint) (supports .NET Framework 4.6.2, .NET Standard 2.0, .NET Standard 2.1, .NET 6 and .NET 8) - * [JS Engine Switcher: Jurassic](http://nuget.org/packages/JavaScriptEngineSwitcher.Jurassic) (supports .NET Framework 4.0 Client, .NET Framework 4.5 and .NET Standard 2.0) - * [JS Engine Switcher: MSIE](http://nuget.org/packages/JavaScriptEngineSwitcher.Msie) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Standard 1.3 and .NET Standard 2.0) - * [JS Engine Switcher: NiL](http://nuget.org/packages/JavaScriptEngineSwitcher.NiL) (supports .NET Framework 4.6.1, .NET Framework 4.8, .NET Core App 3.1, .NET 5.0, .NET 6 and .NET 7) - * [JS Engine Switcher: Node](http://nuget.org/packages/JavaScriptEngineSwitcher.Node) (supports .NET Framework 4.6.1, .NET Standard 2.0, .NET Core App 3.1, .NET 5.0, .NET 6 and .NET 7) - * [JS Engine Switcher: V8](http://nuget.org/packages/JavaScriptEngineSwitcher.V8) (supports .NET Framework 4.5, .NET Framework 4.7.1, .NET Standard 2.1, .NET Core App 3.1 and .NET 5.0) + * [JS Engine Switcher: Jint](http://nuget.org/packages/JavaScriptEngineSwitcher.Jint) (supports .NET Framework 4.6.2, .NET Standard 2.0, .NET Standard 2.1, .NET 8 and .NET 10) + * [JS Engine Switcher: Jurassic](http://nuget.org/packages/JavaScriptEngineSwitcher.Jurassic) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Standard 2.0 and .NET 10) + * [JS Engine Switcher: MSIE](http://nuget.org/packages/JavaScriptEngineSwitcher.Msie) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Standard 1.3, .NET Standard 2.0, .NET Standard 2.1 and .NET 10) + * [JS Engine Switcher: NiL](http://nuget.org/packages/JavaScriptEngineSwitcher.NiL) (supports .NET Framework 4.6.1, .NET Framework 4.8, .NET Standard 2.1, .NET 8, .NET 9 and .NET 10) + * [JS Engine Switcher: Node](http://nuget.org/packages/JavaScriptEngineSwitcher.Node) (supports .NET Framework 4.6.1, .NET Standard 2.0, .NET Core App 3.1, .NET 5.0, .NET 6, .NET 7 and .NET 10) + * [JS Engine Switcher: V8](http://nuget.org/packages/JavaScriptEngineSwitcher.V8) (supports .NET Framework 4.6.2, .NET Framework 4.7.1, .NET Standard 2.1, .NET Core App 3.1, .NET 5.0 and .NET 10) * [Microsoft ClearScript.V8 for Windows (x86)](https://www.nuget.org/packages/Microsoft.ClearScript.V8.Native.win-x86) * [Microsoft ClearScript.V8 for Windows (x64)](https://www.nuget.org/packages/Microsoft.ClearScript.V8.Native.win-x64) * [Microsoft ClearScript.V8 for Windows (ARM64)](https://www.nuget.org/packages/Microsoft.ClearScript.V8.Native.win-arm64) @@ -41,8 +41,8 @@ This library can be installed through NuGet: * [Microsoft ClearScript.V8 for Linux (ARM64)](https://www.nuget.org/packages/Microsoft.ClearScript.V8.Native.linux-arm64) * [Microsoft ClearScript.V8 for OS X (x64)](https://www.nuget.org/packages/Microsoft.ClearScript.V8.Native.osx-x64) * [Microsoft ClearScript.V8 for OS X (ARM64)](https://www.nuget.org/packages/Microsoft.ClearScript.V8.Native.osx-arm64) - * [JS Engine Switcher: Vroom](http://nuget.org/packages/JavaScriptEngineSwitcher.Vroom) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Framework 4.7.1, .NET Standard 1.6 and .NET Standard 2.0) - * [JS Engine Switcher: Yantra](http://nuget.org/packages/JavaScriptEngineSwitcher.Yantra) (supports .NET Standard 2.0 and .NET Standard 2.1) + * [JS Engine Switcher: Vroom](http://nuget.org/packages/JavaScriptEngineSwitcher.Vroom) (supports .NET Framework 4.0 Client, .NET Framework 4.5, .NET Framework 4.7.1, .NET Standard 1.6, .NET Standard 2.0 and .NET 10) + * [JS Engine Switcher: Yantra](http://nuget.org/packages/JavaScriptEngineSwitcher.Yantra) (supports .NET Standard 2.0, .NET Standard 2.1, .NET 8 and .NET 10) If you have used the JavaScript Engine Switcher version 2.X, then I recommend to first read [“How to upgrade applications to version 3.X”](https://github.com/Taritsyn/JavaScriptEngineSwitcher/wiki/How-to-upgrade-applications-to-version-3.X) section of the documentation. diff --git a/build/common.props b/build/common.props index 1c35b9d0..0fa4bdf8 100644 --- a/build/common.props +++ b/build/common.props @@ -1,7 +1,8 @@ - Copyright © 2013-2024 Andrey Taritsyn + Copyright © 2013-2026 Andrey Taritsyn false false + 14.0 \ No newline at end of file diff --git a/global.json b/global.json index 1658e451..512142d2 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,6 @@ { "sdk": { - "version": "8.0.204" + "version": "10.0.100", + "rollForward": "latestFeature" } } diff --git a/lib/ChakraCore/runtimes/linux-x64/native/libChakraCore.so b/lib/ChakraCore/runtimes/linux-x64/native/libChakraCore.so index 02a9048f..b9b5cf77 100644 Binary files a/lib/ChakraCore/runtimes/linux-x64/native/libChakraCore.so and b/lib/ChakraCore/runtimes/linux-x64/native/libChakraCore.so differ diff --git a/lib/ChakraCore/runtimes/osx-x64/native/libChakraCore.dylib b/lib/ChakraCore/runtimes/osx-x64/native/libChakraCore.dylib index 3d4b5541..77c6c97a 100644 Binary files a/lib/ChakraCore/runtimes/osx-x64/native/libChakraCore.dylib and b/lib/ChakraCore/runtimes/osx-x64/native/libChakraCore.dylib differ diff --git a/lib/ChakraCore/runtimes/win-arm/native/ChakraCore.dll b/lib/ChakraCore/runtimes/win-arm/native/ChakraCore.dll index 5fac13d2..3a47e016 100644 Binary files a/lib/ChakraCore/runtimes/win-arm/native/ChakraCore.dll and b/lib/ChakraCore/runtimes/win-arm/native/ChakraCore.dll differ diff --git a/lib/ChakraCore/runtimes/win-arm64/native/ChakraCore.dll b/lib/ChakraCore/runtimes/win-arm64/native/ChakraCore.dll index 16bab28c..c5fe81f9 100644 Binary files a/lib/ChakraCore/runtimes/win-arm64/native/ChakraCore.dll and b/lib/ChakraCore/runtimes/win-arm64/native/ChakraCore.dll differ diff --git a/lib/ChakraCore/runtimes/win-x64/native/ChakraCore.dll b/lib/ChakraCore/runtimes/win-x64/native/ChakraCore.dll index c9bd8a01..06bf213b 100644 Binary files a/lib/ChakraCore/runtimes/win-x64/native/ChakraCore.dll and b/lib/ChakraCore/runtimes/win-x64/native/ChakraCore.dll differ diff --git a/lib/ChakraCore/runtimes/win-x86/native/ChakraCore.dll b/lib/ChakraCore/runtimes/win-x86/native/ChakraCore.dll index f53e5e68..6bb68b8c 100644 Binary files a/lib/ChakraCore/runtimes/win-x86/native/ChakraCore.dll and b/lib/ChakraCore/runtimes/win-x86/native/ChakraCore.dll differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4.csproj index 34092484..6ba86ea0 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4.csproj +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4.csproj @@ -1,9 +1,9 @@  - - - - + + + + Debug @@ -182,17 +182,10 @@ - - - - - - - - - - - + + @@ -218,9 +211,9 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - + + + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs index 406319a7..bc265cc7 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs @@ -6,12 +6,12 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("JS Engine Switcher: Sample ASP.NET MVC 4 Site")] -[assembly: AssemblyCopyright("Copyright © 2013-2024 Andrey Taritsyn")] +[assembly: AssemblyCopyright("Copyright © 2013-2026 Andrey Taritsyn")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("39487053-b459-4433-ae93-e00affc653c6")] -[assembly: AssemblyVersion("3.26.0.0")] -[assembly: AssemblyFileVersion("3.26.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("3.33.1.0")] +[assembly: AssemblyFileVersion("3.33.1.0")] \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Home/Contact.cshtml index cc33fd4d..2154ade2 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Home/Contact.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Home/Contact.cshtml @@ -5,19 +5,4 @@

@ViewBag.Title

@Html.Raw(ViewBag.Body) -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Shared/_Layout.cshtml index 91328e8d..7a886756 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Views/Shared/_Layout.cshtml @@ -54,9 +54,10 @@
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Web.config b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Web.config index 3e44d3df..58f6312e 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Web.config +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Web.config @@ -27,6 +27,18 @@ + + + + + + + + + + + + diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/build-frontend.cmd b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/build-frontend.cmd new file mode 100644 index 00000000..b36fa314 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/build-frontend.cmd @@ -0,0 +1,41 @@ +@echo off +setlocal + +::-------------------------------------------------------------------------------- +:: Build +::-------------------------------------------------------------------------------- + +echo Starting to build the frontend for ASP.NET MVC 4 sample ... +echo. + +echo Installing Node.js packages ... +echo. +call npm install +if errorlevel 1 goto error +echo. + +echo Installing Bower packages ... +echo. +call bower install +if errorlevel 1 goto error +echo. + +echo Building client-side assets ... +echo. +call gulp +if errorlevel 1 goto error +echo. + +::-------------------------------------------------------------------------------- +:: Exit +::-------------------------------------------------------------------------------- + +echo Succeeded! +goto exit + +:error +echo *** Error: The previous step failed! + +:exit +cd ../../ +endlocal \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/build-frontend.sh b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/build-frontend.sh new file mode 100644 index 00000000..112d2a8d --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/build-frontend.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +function handle_error() +{ + _RET=${PIPESTATUS[0]} + if [[ $_RET != 0 ]]; then + echo "*** Error: The previous step failed!" + + cd ../../ + exit $_RET + fi +} + +echo "Starting to build the frontend for ASP.NET MVC 4 sample ..." +echo "" + +echo "Installing Node.js packages ..." +echo "" +npm install +handle_error +echo "" + +echo "Installing Bower packages ..." +echo "" +bower install +handle_error +echo "" + +echo "Building client-side assets ..." +echo "" +gulp +handle_error +echo "" + +echo "Succeeded!" + +cd ../../ +exit $_RET \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/images/icons/32x32/social-media-icons-32.png index 49aa1fe3..30d1c781 100644 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/images/icons/32x32/social-media-icons-32.png and b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/images/icons/32x32/social-media-icons-32.png differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json index 85e25c6e..a586e8e0 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json @@ -1,7 +1,7 @@ { "name": "jsengineswitcher.sample.aspnet4.mvc4", "private": true, - "version": "3.26.0", + "version": "3.33.1", "devDependencies": { "gulp": "4.0.2", "del": "5.1.0", diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/packages.config b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/packages.config index 7e793968..3b098590 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/packages.config +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/packages.config @@ -1,9 +1,9 @@  - - - - + + + + diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/styles/icons.less index 79b9d9e5..4a80f963 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/styles/icons.less +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/styles/icons.less @@ -15,11 +15,11 @@ width: 32px; } -.icon-facebook { +.icon-mastodon { background-position: 0 0; } -.icon-twitter { +.icon-x { background-position: 0 -32px; } @@ -27,6 +27,10 @@ background-position: 0 -64px; } +.icon-bluesky { + background-position: 0 -96px; +} + .icon-rss { background-position: 0 -128px; } \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/.bowerrc similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/.bowerrc rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/.bowerrc diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets.csproj new file mode 100644 index 00000000..d24da41a --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets.csproj @@ -0,0 +1,11 @@ + + + + JS Engine Switcher: Client-Side Assets for ASP.NET Core Samples + 3.33.1 + netstandard2.0 + Library + false + + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/bower.json similarity index 75% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/bower.json rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/bower.json index cc2b80bb..3a9323a2 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/bower.json +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/bower.json @@ -1,5 +1,5 @@ { - "name": "jsengineswitcher.sample.aspnetcore21.mvc21", + "name": "javascriptengineswitcher.sample.aspnetcore.clientsideassets", "dependencies": { "modernizr": "2.8.3", "jquery-compat": "jquery#1.10.2", diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/build-frontend.cmd b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/build-frontend.cmd new file mode 100644 index 00000000..de3af278 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/build-frontend.cmd @@ -0,0 +1,41 @@ +@echo off +setlocal + +::-------------------------------------------------------------------------------- +:: Build +::-------------------------------------------------------------------------------- + +echo Starting to build the frontend for ASP.NET Core samples ... +echo. + +echo Installing Node.js packages ... +echo. +call npm install +if errorlevel 1 goto error +echo. + +echo Installing Bower packages ... +echo. +call bower install +if errorlevel 1 goto error +echo. + +echo Building client-side assets ... +echo. +call gulp +if errorlevel 1 goto error +echo. + +::-------------------------------------------------------------------------------- +:: Exit +::-------------------------------------------------------------------------------- + +echo Succeeded! +goto exit + +:error +echo *** Error: The previous step failed! + +:exit +cd ../../ +endlocal \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/build-frontend.sh b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/build-frontend.sh new file mode 100644 index 00000000..06a7afd9 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/build-frontend.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +function handle_error() +{ + _RET=${PIPESTATUS[0]} + if [[ $_RET != 0 ]]; then + echo "*** Error: The previous step failed!" + + cd ../../ + exit $_RET + fi +} + +echo "Starting to build the frontend for ASP.NET Core samples ..." +echo "" + +echo "Installing Node.js packages ..." +echo "" +npm install +handle_error +echo "" + +echo "Installing Bower packages ..." +echo "" +bower install +handle_error +echo "" + +echo "Building client-side assets ..." +echo "" +gulp +handle_error +echo "" + +echo "Succeeded!" + +cd ../../ +exit $_RET \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/ensure-client-side-assets-builded.targets b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/ensure-client-side-assets-builded.targets new file mode 100644 index 00000000..3f41ba35 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/ensure-client-side-assets-builded.targets @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/gulpfile.js similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/gulpfile.js rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/gulpfile.js diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/package.json similarity index 75% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/package.json index a52b98b4..b00547b9 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/package.json @@ -1,7 +1,7 @@ { - "name": "jsengineswitcher.sample.aspnetcore1full.mvc1", + "name": "javascriptengineswitcher.sample.aspnetcore.clientsideassets", "private": true, - "version": "3.26.0", + "version": "3.33.1", "devDependencies": { "gulp": "4.0.2", "del": "5.1.0", diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/0.gif similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/0.gif rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/0.gif diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/clear-text.png similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/clear-text.png rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/clear-text.png diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/icons/32x32/social-media-icons-32.png new file mode 100644 index 00000000..30d1c781 Binary files /dev/null and b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/icons/32x32/social-media-icons-32.png differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/icons/48x48/error.png similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/icons/48x48/error.png rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/icons/48x48/error.png diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/jsengineswitcher-logo.png similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/jsengineswitcher-logo.png rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/images/jsengineswitcher-logo.png diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/scripts/_references.js similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/scripts/_references.js rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/scripts/_references.js diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/scripts/common.js similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/scripts/common.js rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/scripts/common.js diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/scripts/evaluation-form.js similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/scripts/evaluation-form.js rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/scripts/evaluation-form.js diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/app.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/app.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/app.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/bootstrap-custom-variables.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/bootstrap-custom-variables.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/bootstrap-custom-variables.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/buttons.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/buttons.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/buttons.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/code.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/code.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/code.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/evaluation-form.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/evaluation-form.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/evaluation-form.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/forms.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/forms.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/forms.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/icons.less similarity index 85% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/icons.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/icons.less index 79b9d9e5..4a80f963 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/icons.less +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/icons.less @@ -15,11 +15,11 @@ width: 32px; } -.icon-facebook { +.icon-mastodon { background-position: 0 0; } -.icon-twitter { +.icon-x { background-position: 0 -32px; } @@ -27,6 +27,10 @@ background-position: 0 -64px; } +.icon-bluesky { + background-position: 0 -96px; +} + .icon-rss { background-position: 0 -128px; } \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/layout.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/layout.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/layout.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/mixins.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/mixins.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/mixins.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/navbar.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/navbar.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/navbar.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/page-socials.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/page-socials.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/page-socials.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/type.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/type.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/type.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/variables.less similarity index 100% rename from samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/styles/variables.less rename to samples/JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot/styles/variables.less diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.csproj index ecc6f472..15f00dc8 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.csproj +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure/JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.csproj @@ -2,11 +2,13 @@ JS Engine Switcher: Infrastructure for ASP.NET Core Samples - 3.26.0 - net451;netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0 + 3.33.1 + net451;netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 1.6.0 Library true + $(NoWarn);NETSDK1215;NU1902;NU1903;NU1904 + false false false @@ -32,15 +34,23 @@ - + - + - + + + + + + + + + diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj index 0b66a1ad..a60b6cb6 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj @@ -2,12 +2,12 @@ JS Engine Switcher: Sample ASP.NET Core 1.0 MVC 1 Site - 3.26.0 + 3.33.1 netcoreapp1.0 1.0.16 Exe false - $(NoWarn);NU1903 + $(NoWarn);NU1903;NU1904 true true false @@ -50,22 +50,6 @@ - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Program.cs index a114871d..f2bd4508 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Program.cs +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Program.cs @@ -8,9 +8,14 @@ public class Program { public static void Main(string[] args) { + string currentDirectory = Directory.GetCurrentDirectory(); var host = new WebHostBuilder() .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) + .UseContentRoot(currentDirectory) + .UseWebRoot(Path.Combine( + currentDirectory, + "../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot" + )) .UseIISIntegration() .UseStartup() .Build() diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Home/Contact.cshtml index cd9663df..58785ebe 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Home/Contact.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Home/Contact.cshtml @@ -5,19 +5,4 @@

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Shared/_Layout.cshtml index 7aeb68c8..b60019c1 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/bower.json deleted file mode 100644 index ebc0d4d1..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore1.mvc1", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json deleted file mode 100644 index 73969017..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore1.mvc1", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Controllers/HomeController.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Controllers/HomeController.cs new file mode 100644 index 00000000..57f376ff --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Controllers/HomeController.cs @@ -0,0 +1,83 @@ +using System.Diagnostics; +using System.Threading.Tasks; + +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Html; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; + +using JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Models; +using JavaScriptEngineSwitcher.Sample.Logic.Models; +using JavaScriptEngineSwitcher.Sample.Logic.Services; + +namespace JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Controllers +{ + public class HomeController : Controller + { + private readonly FileContentService _fileContentService; + private readonly JsEvaluationService _jsEvaluationService; + + + public HomeController( + IConfigurationRoot configuration, + IWebHostEnvironment hostingEnvironment, + JsEvaluationService jsEvaluationService) + { + string textContentDirectoryPath = configuration + .GetSection("jsengineswitcher") + .GetSection("Samples")["TextContentDirectoryPath"] + ; + + _fileContentService = new FileContentService(textContentDirectoryPath, hostingEnvironment); + _jsEvaluationService = jsEvaluationService; + } + + + [ResponseCache(CacheProfileName = "CacheCompressedContent5Minutes")] + public IActionResult Index() + { + ViewBag.Body = new HtmlString(_fileContentService.GetFileContent("index.html")); + + return View(); + } + + [HttpGet] + [ResponseCache(CacheProfileName = "CacheCompressedContent5Minutes")] + public IActionResult Demo() + { + var model = _jsEvaluationService.GetInitializationData(); + + return View(model); + } + + [HttpPost] + public async Task Demo(JsEvaluationViewModel editedModel) + { + var model = _jsEvaluationService.GetInitializationData(); + await TryUpdateModelAsync(model, string.Empty, m => m.EngineName, m=> m.Expression); + + if (ModelState.IsValid) + { + model = _jsEvaluationService.Evaluate(model); + + ModelState.Clear(); + } + + return View(model); + } + + [ResponseCache(CacheProfileName = "CacheCompressedContent5Minutes")] + public IActionResult Contact() + { + ViewBag.Body = new HtmlString(_fileContentService.GetFileContent("contact.html")); + + return View(); + } + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } + } +} \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10.csproj new file mode 100644 index 00000000..d9e790a6 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10.csproj @@ -0,0 +1,49 @@ + + + + JS Engine Switcher: Sample ASP.NET Core 10.0 MVC 10 Site + 3.33.1 + net10.0 + enable + Exe + true + true + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Models/ErrorViewModel.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Models/ErrorViewModel.cs new file mode 100644 index 00000000..20cc9827 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Models/ErrorViewModel.cs @@ -0,0 +1,9 @@ +namespace JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Models +{ + public class ErrorViewModel + { + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Program.cs new file mode 100644 index 00000000..457ccf63 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Program.cs @@ -0,0 +1,105 @@ +using Jering.Javascript.NodeJS; +using Microsoft.AspNetCore.Mvc; + +using JavaScriptEngineSwitcher.ChakraCore; +using JavaScriptEngineSwitcher.Extensions.MsDependencyInjection; +using JavaScriptEngineSwitcher.Jint; +using JavaScriptEngineSwitcher.Jurassic; +using JavaScriptEngineSwitcher.Msie; +using JavaScriptEngineSwitcher.NiL; +using JavaScriptEngineSwitcher.Node; +using JavaScriptEngineSwitcher.Sample.Logic.Services; +using JavaScriptEngineSwitcher.V8; +using JavaScriptEngineSwitcher.Vroom; +using JavaScriptEngineSwitcher.Yantra; + +var builder = WebApplication.CreateBuilder(new WebApplicationOptions() { + WebRootPath = Path.Combine( + Directory.GetCurrentDirectory(), + "../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot" + ) +}); +var env = builder.Environment; +var configuration = new ConfigurationBuilder() + .SetBasePath(env.ContentRootPath) + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) + .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) + .AddEnvironmentVariables() + .Build() + ; + +#region Configure services + +IServiceCollection services = builder.Services; + +services.AddSingleton(configuration); + +// Add Jering Node.js service to the services container. +services.AddNodeJS(); + +// Add JavaScriptEngineSwitcher services to the services container. +services.AddJsEngineSwitcher(options => +{ + options.AllowCurrentProperty = false; + options.DefaultEngineName = ChakraCoreJsEngine.EngineName; +}) + .AddChakraCore() + .AddJint() + .AddJurassic() + .AddMsie(options => + { + options.EngineMode = JsEngineMode.ChakraIeJsRt; + }) + .AddNiL() + .AddNode(services) + .AddV8() + .AddVroom() + .AddYantra() + ; + +services.Configure(options => +{ + options.CacheProfiles.Add("CacheCompressedContent5Minutes", + new CacheProfile + { + NoStore = builder.Environment.IsDevelopment(), + Duration = 300, + Location = ResponseCacheLocation.Client, + VaryByHeader = "Accept-Encoding" + } + ); +}); + +// Add framework services. +services.AddControllersWithViews(); + +// Add JavaScriptEngineSwitcher sample services to the services container. +services.AddSingleton(); + +#endregion + +#region Configure the HTTP request pipeline + +var app = builder.Build(); + +if (app.Environment.IsDevelopment()) +{ + app.UseDeveloperExceptionPage(); +} +else +{ + app.UseExceptionHandler("/Home/Error"); +} + +app.UseRouting(); + +app.MapStaticAssets(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}") + .WithStaticAssets(); + +#endregion + +app.Run(); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Properties/launchSettings.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Properties/launchSettings.json new file mode 100644 index 00000000..2c93180d --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Properties/launchSettings.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:61316/", + "sslPort": 44396 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5169" + }, + "https": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7103;http://localhost:5169" + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Contact.cshtml new file mode 100644 index 00000000..58785ebe --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Contact.cshtml @@ -0,0 +1,8 @@ +@{ + ViewBag.Title = "Contact"; +} + +
+

@ViewBag.Title

+ @ViewBag.Body +
\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Demo.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Demo.cshtml new file mode 100644 index 00000000..befb8f43 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Demo.cshtml @@ -0,0 +1,67 @@ +@using JavaScriptEngineSwitcher.Sample.Logic.Models +@using JavaScriptEngineSwitcher.Sample.Resources + +@model JsEvaluationViewModel + +@{ + ViewBag.Title = "Demo"; +} + +

@ViewBag.Title

+ +
+
+
+
+
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ + @if (Model.Result != null) + { +
+ @if (Model.Result.Errors.Count == 0) + { +
+ + +
+ } + else + { + await Html.RenderPartialAsync("_JsEvaluationErrorList", Model.Result.Errors); + } +
+ } +
+
+
+ +@section Scripts { + + + + + + + + + +} \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Index.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Index.cshtml new file mode 100644 index 00000000..a9c2cfb1 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Home/Index.cshtml @@ -0,0 +1,8 @@ +@{ + ViewBag.Title = string.Empty; +} + +
+

Project Description

+ @ViewBag.Body +
\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/Error.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/Error.cshtml new file mode 100644 index 00000000..b568b9f2 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/Error.cshtml @@ -0,0 +1,28 @@ +@using JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Models + +@model ErrorViewModel + +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/_JsEvaluationErrorList.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/_JsEvaluationErrorList.cshtml new file mode 100644 index 00000000..9e0601d6 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/_JsEvaluationErrorList.cshtml @@ -0,0 +1,23 @@ +@using JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.Helpers +@using JavaScriptEngineSwitcher.Sample.Logic.Models + +@model IList + +

Found @Model.Count error(s):

+
    + @foreach (var error in Model) + { +
  • + @error.EngineFullName
    + @if (error.LineNumber > 0) + { + Line @error.LineNumber, Column @error.ColumnNumber
    + } + @Html.EncodedReplace(@error.Message, "\n\r?", "
    ") + @if (!string.IsNullOrWhiteSpace(error.SourceFragment)) + { +
    @error.SourceFragment
    + } +
  • + } +
\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/_Layout.cshtml new file mode 100644 index 00000000..62e3d72c --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/Shared/_Layout.cshtml @@ -0,0 +1,107 @@ +@using JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.TagHelpers + + + + + + + + + @if (!string.IsNullOrEmpty(ViewBag.Title)) {<text>@ViewBag.Title | </text>}JavaScriptEngineSwitcher Sample ASP.NET Core 10.0 MVC 10 Site + + + + + + + + + + + + +
+ + + + + +
+
+ @RenderBody() +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @await RenderSectionAsync("scripts", required: false) + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/_ViewImports.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/_ViewImports.cshtml new file mode 100644 index 00000000..dcad619c --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/_ViewImports.cshtml @@ -0,0 +1,2 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/_ViewStart.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/_ViewStart.cshtml new file mode 100644 index 00000000..817a9134 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/appsettings.Development.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/appsettings.Development.json new file mode 100644 index 00000000..0c208ae9 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/appsettings.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/appsettings.json new file mode 100644 index 00000000..ed44b7ae --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore10.Mvc10/appsettings.json @@ -0,0 +1,15 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + + "JsEngineSwitcher": { + "Samples": { + "TextContentDirectoryPath": "../SharedData/text-content" + } + } +} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/.bowerrc deleted file mode 100644 index ea81a597..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/.bowerrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "registry": "https://registry.bower.io", - "directory": "wwwroot/lib" -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj index 53b9f6a3..d2102558 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj @@ -2,10 +2,11 @@ JS Engine Switcher: Sample ASP.NET Core 1.0 Full MVC 1 Site - 3.26.0 + 3.33.1 net451 Exe true + $(NoWarn);NU1903;NU1904 true true false @@ -30,9 +31,6 @@ - - - @@ -41,7 +39,6 @@ - @@ -52,22 +49,6 @@ - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Program.cs index 05e6c571..56e599bf 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Program.cs +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Program.cs @@ -8,9 +8,14 @@ public class Program { public static void Main(string[] args) { + string currentDirectory = Directory.GetCurrentDirectory(); var host = new WebHostBuilder() .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) + .UseContentRoot(currentDirectory) + .UseWebRoot(Path.Combine( + currentDirectory, + "../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot" + )) .UseIISIntegration() .UseStartup() .Build() diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Startup.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Startup.cs index aea58611..970f4b07 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Startup.cs +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Startup.cs @@ -11,7 +11,6 @@ using JavaScriptEngineSwitcher.Jurassic; using JavaScriptEngineSwitcher.Msie; using JavaScriptEngineSwitcher.Sample.Logic.Services; -using JavaScriptEngineSwitcher.V8; using JavaScriptEngineSwitcher.Vroom; namespace JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1 @@ -63,7 +62,6 @@ public void ConfigureServices(IServiceCollection services) { options.EngineMode = JsEngineMode.ChakraIeJsRt; }) - .AddV8() .AddVroom() ; diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Home/Contact.cshtml index cd9663df..58785ebe 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Home/Contact.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Home/Contact.cshtml @@ -5,19 +5,4 @@

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Shared/_Layout.cshtml index 7473eba4..34baa99f 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/bower.json deleted file mode 100644 index 0e307723..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore1full.mvc1", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/.bowerrc
deleted file mode 100644
index ea81a597..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "registry": "https://registry.bower.io",
-  "directory": "wwwroot/lib"
-}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj
index 347eed0f..9fe6e217 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj
@@ -2,11 +2,12 @@
 
   
     JS Engine Switcher: Sample ASP.NET Core 2.1 MVC 2.1 Site
-    3.26.0
+    3.33.1
     netcoreapp2.1
     Exe
     true
-    $(NoWarn);NU1902;NU1903
+    $(NoWarn);NU1902;NU1903;NU1904
+    true
     true
     true
     false
@@ -34,21 +35,6 @@
     
   
 
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-    
-    
-  
+  
+
 
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Program.cs
index 51f24982..3dcfa5fc 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Program.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Program.cs
@@ -1,4 +1,6 @@
-using Microsoft.AspNetCore;
+using System.IO;
+
+using Microsoft.AspNetCore;
 using Microsoft.AspNetCore.Hosting;
 
 namespace JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21
@@ -12,6 +14,10 @@ public static void Main(string[] args)
 
 		public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
 			WebHost.CreateDefaultBuilder(args)
+				.UseWebRoot(Path.Combine(
+					Directory.GetCurrentDirectory(),
+					"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+				))
 				.UseStartup()
 				;
 	}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Home/Contact.cshtml
index cd9663df..58785ebe 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Home/Contact.cshtml
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Home/Contact.cshtml
@@ -5,19 +5,4 @@
 

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Shared/_Layout.cshtml index dbcd4e82..93808b86 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json deleted file mode 100644 index 5aeabd08..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore21.mvc21", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/.bowerrc
deleted file mode 100644
index ea81a597..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "registry": "https://registry.bower.io",
-  "directory": "wwwroot/lib"
-}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj
index 0a971989..f8bc9185 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj
@@ -2,7 +2,7 @@
 
   
     JS Engine Switcher: Sample ASP.NET Core 3.1 MVC 3.1 Site
-    3.26.0
+    3.33.1
     netcoreapp3.1
     Exe
     true
@@ -45,21 +45,6 @@
     
   
 
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-    
-    
-  
+  
+
 
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Program.cs
index 88eae706..889d2a4b 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Program.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Program.cs
@@ -1,4 +1,6 @@
-using Microsoft.AspNetCore.Hosting;
+using System.IO;
+
+using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Logging;
 
@@ -15,6 +17,10 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
 			Host.CreateDefaultBuilder(args)
 				.ConfigureWebHostDefaults(webBuilder =>
 				{
+					webBuilder.UseWebRoot(Path.Combine(
+						Directory.GetCurrentDirectory(),
+						"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+					));
 					webBuilder.UseStartup();
 				})
 				.ConfigureLogging((hostingContext, logging) =>
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Home/Contact.cshtml
index cd9663df..58785ebe 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Home/Contact.cshtml
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Home/Contact.cshtml
@@ -5,19 +5,4 @@
 

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Shared/_Layout.cshtml index 8fc6b9b5..e9ffc46f 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/bower.json deleted file mode 100644 index d2010af1..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore31.mvc31", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json deleted file mode 100644 index e1c21821..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore31.mvc31", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/.bowerrc
deleted file mode 100644
index ea81a597..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "registry": "https://registry.bower.io",
-  "directory": "wwwroot/lib"
-}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5.csproj
index 9a08b2ad..c0600714 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5.csproj
@@ -2,7 +2,7 @@
 
   
     JS Engine Switcher: Sample ASP.NET Core 5.0 MVC 5 Site
-    3.26.0
+    3.33.1
     net5.0
     Exe
     true
@@ -45,22 +45,6 @@
     
   
 
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-    
-    
-  
+  
 
 
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Program.cs
index f51cce46..376442fc 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Program.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Program.cs
@@ -1,4 +1,6 @@
-using Microsoft.AspNetCore.Hosting;
+using System.IO;
+
+using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Logging;
 
@@ -15,6 +17,10 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
 			Host.CreateDefaultBuilder(args)
 				.ConfigureWebHostDefaults(webBuilder =>
 				{
+					webBuilder.UseWebRoot(Path.Combine(
+						Directory.GetCurrentDirectory(),
+						"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+					));
 					webBuilder.UseStartup();
 				})
 				.ConfigureLogging((hostingContext, logging) =>
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Home/Contact.cshtml
index cd9663df..58785ebe 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Home/Contact.cshtml
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Home/Contact.cshtml
@@ -5,19 +5,4 @@
 

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Shared/_Layout.cshtml index 3ffabc13..5fe54776 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/bower.json deleted file mode 100644 index be2b1906..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore5.mvc5", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/package.json deleted file mode 100644 index edfe7b9d..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "javascriptengineswitcher.sample.aspnetcore5.mvc5", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore5.Mvc5/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/.bowerrc
deleted file mode 100644
index ea81a597..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "registry": "https://registry.bower.io",
-  "directory": "wwwroot/lib"
-}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6.csproj
index d0375ffe..00242e76 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6.csproj
@@ -2,11 +2,13 @@
 
   
     JS Engine Switcher: Sample ASP.NET Core 6.0 MVC 6 Site
-    3.26.0
+    3.33.1
     net6.0
     enable
     Exe
     true
+    $(NoWarn);NETSDK1138
+    true
     true
     true
     false
@@ -44,22 +46,6 @@
     
   
 
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-    
-    
-  
+  
 
 
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Program.cs
index 0804fb93..2e472860 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Program.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Program.cs
@@ -13,7 +13,13 @@
 using JavaScriptEngineSwitcher.Vroom;
 using JavaScriptEngineSwitcher.Yantra;
 
-var builder = WebApplication.CreateBuilder(args);
+var builder = WebApplication.CreateBuilder(new WebApplicationOptions()
+{
+	WebRootPath = Path.Combine(
+		Directory.GetCurrentDirectory(),
+		"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+	)
+});
 var env = builder.Environment;
 var configuration = new ConfigurationBuilder()
 	.SetBasePath(env.ContentRootPath)
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Home/Contact.cshtml
index cd9663df..58785ebe 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Home/Contact.cshtml
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Home/Contact.cshtml
@@ -5,19 +5,4 @@
 

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Shared/_Layout.cshtml index 6e178e78..b1f433fd 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/bower.json deleted file mode 100644 index 992994cf..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore6.mvc6", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/package.json deleted file mode 100644 index 19f4ca3e..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "javascriptengineswitcher.sample.aspnetcore6.mvc6", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore6.Mvc6/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/.bowerrc
deleted file mode 100644
index ea81a597..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "registry": "https://registry.bower.io",
-  "directory": "wwwroot/lib"
-}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7.csproj
index 0d5d19ca..82a56176 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7.csproj
@@ -2,14 +2,16 @@
 
   
     JS Engine Switcher: Sample ASP.NET Core 7.0 MVC 7 Site
-    3.26.0
+    3.33.1
     net7.0
     enable
     Exe
     true
+    true
     true
     true
     false
+    false
   
 
   
@@ -44,22 +46,6 @@
     
   
 
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-    
-    
-  
+  
 
 
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Program.cs
index 0804fb93..2e472860 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Program.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Program.cs
@@ -13,7 +13,13 @@
 using JavaScriptEngineSwitcher.Vroom;
 using JavaScriptEngineSwitcher.Yantra;
 
-var builder = WebApplication.CreateBuilder(args);
+var builder = WebApplication.CreateBuilder(new WebApplicationOptions()
+{
+	WebRootPath = Path.Combine(
+		Directory.GetCurrentDirectory(),
+		"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+	)
+});
 var env = builder.Environment;
 var configuration = new ConfigurationBuilder()
 	.SetBasePath(env.ContentRootPath)
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Home/Contact.cshtml
index cd9663df..58785ebe 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Home/Contact.cshtml
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Home/Contact.cshtml
@@ -5,19 +5,4 @@
 

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Shared/_Layout.cshtml index f9053851..fe014242 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/bower.json deleted file mode 100644 index 0283757d..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore7.mvc7", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/package.json deleted file mode 100644 index a24da43b..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "javascriptengineswitcher.sample.aspnetcore7.mvc7", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore7.Mvc7/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/.bowerrc b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/.bowerrc
deleted file mode 100644
index ea81a597..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "registry": "https://registry.bower.io",
-  "directory": "wwwroot/lib"
-}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8.csproj
index ef88ca03..ce8ed812 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8.csproj
@@ -2,7 +2,7 @@
 
   
     JS Engine Switcher: Sample ASP.NET Core 8.0 MVC 8 Site
-    3.26.0
+    3.33.1
     net8.0
     enable
     Exe
@@ -44,22 +44,6 @@
     
   
 
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-  
-  
-    
-    
-    
-  
+  
 
 
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Program.cs
index 0804fb93..2e472860 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Program.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Program.cs
@@ -13,7 +13,13 @@
 using JavaScriptEngineSwitcher.Vroom;
 using JavaScriptEngineSwitcher.Yantra;
 
-var builder = WebApplication.CreateBuilder(args);
+var builder = WebApplication.CreateBuilder(new WebApplicationOptions()
+{
+	WebRootPath = Path.Combine(
+		Directory.GetCurrentDirectory(),
+		"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+	)
+});
 var env = builder.Environment;
 var configuration = new ConfigurationBuilder()
 	.SetBasePath(env.ContentRootPath)
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Home/Contact.cshtml
index cd9663df..58785ebe 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Home/Contact.cshtml
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Home/Contact.cshtml
@@ -5,19 +5,4 @@
 

@ViewBag.Title

@ViewBag.Body -
- -@section Scripts { - -} \ No newline at end of file + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Shared/_Layout.cshtml index 72dda5b8..ebe02bba 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Shared/_Layout.cshtml +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/Views/Shared/_Layout.cshtml @@ -61,9 +61,10 @@ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/bower.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/bower.json deleted file mode 100644 index ab753d96..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "jsengineswitcher.sample.aspnetcore8.mvc8", - "dependencies": { - "modernizr": "2.8.3", - "jquery-compat": "jquery#1.10.2", - "jquery": "jquery#2.0.3", - "jquery-validation": "1.13.1", - "jquery-validation-unobtrusive": "3.2.3", - "bootstrap": "3.3.0" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/gulpfile.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/gulpfile.js deleted file mode 100644 index 0f259437..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/gulpfile.js +++ /dev/null @@ -1,130 +0,0 @@ -/*global require, exports */ -/*jshint esversion: 6 */ -const WEB_ROOT_PATH = "wwwroot"; -const BOWER_DIR_PATH = WEB_ROOT_PATH + "/lib"; -const STYLE_DIR_PATH = WEB_ROOT_PATH + '/styles'; -const SCRIPT_DIR_PATH = WEB_ROOT_PATH + '/scripts'; - -// include plug-ins -let { src, dest, series, parallel, watch } = require('gulp'); -let del = require('del'); -let sourcemaps = require('gulp-sourcemaps'); -let rename = require('gulp-rename'); -let concat = require('gulp-concat'); -let less = require('gulp-less'); -let autoprefixer = require('gulp-autoprefixer'); -let cleanCss = require('gulp-clean-css'); -let uglify = require('gulp-uglify'); - -//#region Clean -//#region Clean builded assets -function cleanBuildedStyles() { - return del([STYLE_DIR_PATH + '/build/*']); -} - -function cleanBuildedScripts() { - return del([SCRIPT_DIR_PATH + '/build/*']); -} - -let cleanBuildedAssets = parallel(cleanBuildedStyles, cleanBuildedScripts); -//#endregion -//#endregion - -//#region Build assets -//#region Build styles -let autoprefixerOptions = { - overrideBrowserslist: ['> 1%', 'last 3 versions', 'Firefox ESR', 'Opera 12.1'], - cascade: true -}; -let cssCleanOptions = { specialComments: '*' }; -let cssRenameOptions = { extname: '.min.css' }; - -function buildCommonStyles() { - return src([STYLE_DIR_PATH + '/app.less']) - .pipe(sourcemaps.init()) - .pipe(less({ - relativeUrls: true, - rootpath: '/styles/' - })) - .pipe(autoprefixer(autoprefixerOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('common-styles.css')) - .pipe(cleanCss(cssCleanOptions)) - .pipe(rename(cssRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(STYLE_DIR_PATH + '/build')) - ; -} - -let buildStyles = buildCommonStyles; -//#endregion - -//#region Build scripts -let jsConcatOptions = { newLine: ';' }; -let jsUglifyOptions = { - output: { comments: /^!/ } -}; -let jsRenameOptions = { extname: '.min.js' }; - -function buildModernizrScripts() { - return src([BOWER_DIR_PATH + '/modernizr/modernizr.js']) - .pipe(sourcemaps.init()) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildCommonScripts() { - return src([SCRIPT_DIR_PATH + '/common.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(rename({ basename: 'common-scripts' })) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -function buildEvaluationFormScripts() { - return src([BOWER_DIR_PATH + '/jquery-validation/dist/jquery.validate.js', - BOWER_DIR_PATH + '/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js', - BOWER_DIR_PATH + '/bootstrap/js/button.js', - SCRIPT_DIR_PATH + '/evaluation-form.js']) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(concat('evaluation-form-scripts.js', jsConcatOptions)) - .pipe(uglify(jsUglifyOptions)) - .pipe(rename(jsRenameOptions)) - .pipe(sourcemaps.write('./')) - .pipe(dest(SCRIPT_DIR_PATH + '/build')) - ; -} - -let buildScripts = parallel(buildModernizrScripts, buildCommonScripts, buildEvaluationFormScripts); -//#endregion - -let buildAssets = parallel(buildStyles, buildScripts); -//#endregion - -//#region Watch assets -function watchStyles() { - return watch([STYLE_DIR_PATH + '/**/*.{less,css}', '!' + STYLE_DIR_PATH + '/build/**/*.*'], - buildStyles); -} - -function watchScripts() { - return watch([SCRIPT_DIR_PATH + '/**/*.js', '!' + SCRIPT_DIR_PATH + '/build/**/*.*'], - buildScripts); -} - -let watchAssets = parallel(watchStyles, watchScripts); -//#endregion - -// Export tasks -exports.cleanBuildedAssets = cleanBuildedAssets; -exports.buildAssets = buildAssets; -exports.watchAssets = watchAssets; -exports.default = series(cleanBuildedAssets, buildAssets); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/package.json deleted file mode 100644 index 5aa643b8..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "javascriptengineswitcher.sample.aspnetcore8.mvc8", - "private": true, - "version": "3.26.0", - "devDependencies": { - "gulp": "4.0.2", - "del": "5.1.0", - "gulp-sourcemaps": "2.6.5", - "gulp-rename": "2.0.0", - "gulp-concat": "2.6.1", - "gulp-less": "4.0.1", - "gulp-autoprefixer": "7.0.1", - "gulp-clean-css": "4.2.0", - "gulp-uglify": "3.0.2" - } -} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/0.gif b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/0.gif deleted file mode 100644 index 35d42e80..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/0.gif and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/clear-text.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/clear-text.png deleted file mode 100644 index 9d217b7f..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/clear-text.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/icons/32x32/social-media-icons-32.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/icons/32x32/social-media-icons-32.png deleted file mode 100644 index 49aa1fe3..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/icons/32x32/social-media-icons-32.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/icons/48x48/error.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/icons/48x48/error.png deleted file mode 100644 index 3d6185f7..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/icons/48x48/error.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/jsengineswitcher-logo.png b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/jsengineswitcher-logo.png deleted file mode 100644 index 12ed97e0..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/images/jsengineswitcher-logo.png and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/_references.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/_references.js deleted file mode 100644 index 2b54eea8..00000000 Binary files a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/_references.js and /dev/null differ diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/common.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/common.js deleted file mode 100644 index c94bf102..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/common.js +++ /dev/null @@ -1,29 +0,0 @@ -var jsEngineSwitcher; - -(function (jsEngineSwitcher, undefined) { - "use strict"; - - jsEngineSwitcher.registerNamespace = function (namespaceString) { - var parts = namespaceString.split("."), - parent = jsEngineSwitcher, - i - ; - - if (parts[0] === "jsEngineSwitcher") { - parts = parts.slice(1); - } - - for (i = 0; i < parts.length; i += 1) { - if (typeof parent[parts[i]] === "undefined") { - parent[parts[i]] = {}; - } - parent = parent[parts[i]]; - } - - return parent; - }; - - jsEngineSwitcher.hasScrollbar = function(elem) { - return (elem.clientHeight < elem.scrollHeight); - }; -}(jsEngineSwitcher = jsEngineSwitcher || {})); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/evaluation-form.js b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/evaluation-form.js deleted file mode 100644 index da1f0199..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/scripts/evaluation-form.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (jsEngineSwitcher, $, undefined) { - "use strict"; - - var $evaluationForm, - $evaluationInputField, - $evaluationInputClearButton, - $evaluateButton - ; - - $(function () { - $evaluationForm = $("form[data-form-type='evaluation-form']"); - $evaluationInputField = $(":input[data-control-type='evaluation-input-field']", $evaluationForm); - $evaluationInputClearButton = $("
"); - $evaluateButton = $(":input[data-control-type='evaluate-button']", $evaluationForm); - - $evaluationForm.on("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton.on("click", onEvaluationInputClearButtonClickHandler); - $evaluationInputField.parent().append($evaluationInputClearButton); - refreshEvaluationInputClearButton(); - $evaluationInputField - .on("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluateButton.removeAttr("disabled"); - }); - - $(window).unload(function() { - $evaluationForm.off("submit", onEvaluationFormSubmitHandler); - - $evaluationInputClearButton - .off("click", onEvaluationInputClearButtonClickHandler) - .remove() - ; - - $evaluationInputField - .off("input propertychange keydown keyup paste", onEvaluationInputFieldChangeHandler) - ; - - $evaluationForm = null; - $evaluationInputField = null; - $evaluationInputClearButton = null; - $evaluateButton = null; - }); - - var refreshEvaluationInputClearButton = function() { - if ($.trim($evaluationInputField.val()).length > 0) { - $evaluationInputClearButton.show(); - } else { - $evaluationInputClearButton.hide(); - } - - if (jsEngineSwitcher.hasScrollbar($evaluationInputField.get(0))) { - $evaluationInputClearButton.addClass("with-scrollbar"); - } - else { - $evaluationInputClearButton.removeClass("with-scrollbar"); - } - }; - - var onEvaluationFormSubmitHandler = function () { - var $form = $(this); - if ($form.valid()) { - $evaluateButton.attr("disabled", "disabled"); - $("textarea[data-control-type='evaluation-output-field']", $form).val(''); - - return true; - } - - return false; - }; - - var onEvaluationInputFieldChangeHandler = function () { - refreshEvaluationInputClearButton(); - }; - - var onEvaluationInputClearButtonClickHandler = function() { - $evaluationInputField.val(""); - - var $button = $(this); - $button.hide(); - }; -}(jsEngineSwitcher, jQuery)); \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/app.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/app.less deleted file mode 100644 index c41a9315..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/app.less +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Bootstrap v3.3.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "bootstrap-custom-variables.less"; -@import "../lib/bootstrap/less/mixins.less"; - -// Reset -@import "../lib/bootstrap/less/normalize.less"; -//@import "../lib/bootstrap/less/print.less"; -//@import "../lib/bootstrap/less/glyphicons.less"; - -// Core CSS -@import "../lib/bootstrap/less/scaffolding.less"; -@import "../lib/bootstrap/less/type.less"; -@import "../lib/bootstrap/less/code.less"; -//@import "../lib/bootstrap/less/grid.less"; -//@import "../lib/bootstrap/less/tables.less"; -@import "../lib/bootstrap/less/forms.less"; -//@import "../lib/bootstrap/less/buttons.less"; - -// Components -//@import "../lib/bootstrap/less/component-animations.less"; -//@import "../lib/bootstrap/less/dropdowns.less"; -//@import "../lib/bootstrap/less/button-groups.less"; -//@import "../lib/bootstrap/less/input-groups.less"; -@import "../lib/bootstrap/less/navs.less"; -@import "../lib/bootstrap/less/navbar.less"; -//@import "../lib/bootstrap/less/breadcrumbs.less"; -//@import "../lib/bootstrap/less/pagination.less"; -//@import "../lib/bootstrap/less/pager.less"; -//@import "../lib/bootstrap/less/labels.less"; -//@import "../lib/bootstrap/less/badges.less"; -//@import "../lib/bootstrap/less/jumbotron.less"; -//@import "../lib/bootstrap/less/thumbnails.less"; -//@import "../lib/bootstrap/less/alerts.less"; -//@import "../lib/bootstrap/less/progress-bars.less"; -//@import "../lib/bootstrap/less/media.less"; -//@import "../lib/bootstrap/less/list-group.less"; -//@import "../lib/bootstrap/less/panels.less"; -//@import "../lib/bootstrap/less/responsive-embed.less"; -//@import "../lib/bootstrap/less/wells.less"; -//@import "../lib/bootstrap/less/close.less"; - -// Components w/ JavaScript -//@import "../lib/bootstrap/less/modals.less"; -//@import "../lib/bootstrap/less/tooltip.less"; -//@import "../lib/bootstrap/less/popovers.less"; -//@import "../lib/bootstrap/less/carousel.less"; - -// Utility classes -@import "../lib/bootstrap/less/utilities.less"; -//@import "../lib/bootstrap/less/responsive-utilities.less"; - -// JavaScriptEngineSwitcher specs -@import "variables.less"; -@import "mixins.less"; - -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "buttons.less"; -@import "icons.less"; -@import "navbar.less"; - -@import "layout.less"; -@import "evaluation-form.less"; -@import "page-socials.less"; \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/bootstrap-custom-variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/bootstrap-custom-variables.less deleted file mode 100644 index 0be2aa6f..00000000 --- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/bootstrap-custom-variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #323330; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: #e3e3e3; - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: #1d0d0d; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: "Helvetica Neue", Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor(@font-size-base * 3);
-@font-size-h2:            @font-size-base * 2.5;
-@font-size-h3:            ceil(@font-size-base * 1.75);
-@font-size-h4:            ceil(@font-size-base * 1.25);
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85);
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    "Open Sans", sans-serif;
-@headings-font-weight:    normal;
-@headings-line-height:    1.1;
-@headings-color:          inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     4px;
-@padding-base-horizontal:   6px;
-
-@padding-large-vertical:    10px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              #333;
-@btn-default-bg:                 @gray-lighter;
-@btn-default-border:             @gray-lighter;
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             darken(@btn-primary-bg, 5%);
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             darken(@btn-success-bg, 5%);
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             darken(@btn-warning-bg, 5%);
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              darken(@btn-danger-bg, 5%);
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @gray;
-//** `` border color
-@input-border:                   #b2b2b2;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #d4b33a;
-
-//** Placeholder text color
-@input-color-placeholder:        #999;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @gray-dark;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      darken(@gray-dark, 5%);
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         #f5f5f5;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     @component-active-color;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    100px;
-@navbar-margin-bottom:             0;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        0;
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             @gray-base;
-@navbar-default-bg:                #f0db4f;
-@navbar-default-border:            #f0db4f;
-
-// Navbar links
-@navbar-default-link-color:                @navbar-default-color;
-@navbar-default-link-hover-color:          @gray-dark;
-@navbar-default-link-hover-bg:             transparent;
-@navbar-default-link-active-color:         @navbar-default-color;
-@navbar-default-link-active-bg:            transparent;
-@navbar-default-link-disabled-color:       #ccc;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
-@navbar-default-brand-hover-bg:            transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        @gray-dark;
-@navbar-default-toggle-border-color:       #ddd;
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      lighten(@gray-light, 15%);
-@navbar-inverse-bg:                         #222;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              transparent;
-@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-link-disabled-color:        #444;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            #333;
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        #333;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              #fff;
-@pagination-active-bg:                 @brand-primary;
-@pagination-active-border:             @brand-primary;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @pagination-disabled-color;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #3c763d;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #31708f;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #8a6d3b;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
-
-@state-danger-text:              #a94442;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  #000;
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         15px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @gray-dark;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @brand-primary;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @state-success-border;
-@panel-success-heading-bg:    @state-success-bg;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @state-warning-border;
-@panel-warning-heading-bg:    @state-warning-bg;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @state-danger-border;
-@panel-danger-heading-bg:     @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @gray-light;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   #b2b2b2;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/buttons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/buttons.less
deleted file mode 100644
index bbb3c620..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/buttons.less
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core styles
-.btn {
-  display: inline-block;
-  padding: 5px 6px 4px 8px;
-  margin-top: 0;
-  margin-bottom: 0; // For input.btn
-  font-family: "Open Sans Condensed", sans-serif;
-  font-size: @font-size-base * 1.3;
-  font-weight: 700;
-  text-transform: uppercase;
-  letter-spacing: 1px;
-  line-height: @line-height-computed;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-color: @gray-lighter;
-  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
-  border: none;
-  border-radius: 3px;
-  .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.3));
-  outline: none !important;
-  white-space: nowrap;
-  .user-select(none);
-
-  &:focus,
-  &.focus {
-    .tab-focus();
-  }
-
-  &:hover,
-  &:focus,
-  &.focus {
-    background-color: lighten(@gray-lighter, 5%);
-    text-decoration: none;
-    .transition(background-color .1s linear);
-  }
-
-  &:active,
-  &.active {
-    outline: 0;
-    padding: 6px 5px 3px 9px;
-  }
-
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
-    .opacity(65);
-    .box-shadow(1px 1px 0 rgba(0, 0, 0, 0.15));
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/code.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/code.less
deleted file mode 100644
index 33af7555..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/code.less
+++ /dev/null
@@ -1,8 +0,0 @@
-code {
-  margin: 0 2px;
-  padding: 1px 5px;
-  border: 1px solid #E1E1E8;
-  background-color: #F7F7F9;
-  color: @gray-dark;
-  font-size: 85%;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/evaluation-form.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/evaluation-form.less
deleted file mode 100644
index 6d505d56..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/evaluation-form.less
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// Evaluation form
-// --------------------------------------------------
-
-
-.evaluation-form {
-  .clearfix();
-
-  textarea {
-    height: 200px;
-  }
-}
-
-.evaluation-input-output {
-  float: left;
-  width: 65%;
-}
-
-.evaluation-input-clear-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 15px;
-  height: 15px;
-  margin: 6px;
-  display: inline-block;
-  background: transparent url("../images/clear-text.png") no-repeat scroll 0 0;
-  opacity: 0.75;
-  line-height: 0;
-  vertical-align: bottom;
-  cursor: pointer;
-
-  &:hover {
-   opacity: 1;
- }
-}
-
-.evaluation-input-clear-button.with-scrollbar {
-  margin-right: 29px;
-}
-
-.evaluation-output {
-  margin-top: 1.5em;
-}
-
-.evaluation-input-field,
-.evaluation-output-field {
-  margin-bottom: 0.5em;
-  .box-sizing(border-box);
-  overflow-x: hidden;
-  line-height: @line-height-computed;
-}
-
-.evaluation-output-field {
-  &[readonly] {
-    cursor: auto;
-    background-color: @input-bg;
-  }
-}
-
-.evaluation-error-header {
-  margin-bottom: @line-height-computed;
-  padding-left: 52px;
-  background: transparent url("../images/icons/48x48/error.png") no-repeat scroll 0 50%;
-  color: @black;
-  font-family: @font-family-sans-serif;
-  font-weight: bold;
-  line-height: 48px;
-  vertical-align: middle;
-}
-
-ul.evaluation-error-list,
-ul.evaluation-warning-list {
-  li {
-    margin-bottom: 1em;
-
-    pre {
-      margin-top: 0.5em;
-      white-space: pre;
-      overflow: auto;
-    }
-  }
-}
-
-ul.evaluation-error-list li pre {
-  background-color: @state-danger-bg;
-}
-
-ul.evaluation-warning-list li pre {
-  background-color: @state-warning-bg;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/forms.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/forms.less
deleted file mode 100644
index 2ceb0559..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/forms.less
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Forms
-// --------------------------------------------------
-
-// GENERAL STYLES
-// --------------
-
-label {
-  font-weight: normal;
-}
-
-
-// Form controls
-// -------------------------
-
-// Common form controls
-.form-control {
-  line-height: @input-height-base;
-}
-
-.textarea-wrapper {
-  position: relative;
-}
-
-// Form groups
-.form-group {
-  margin-bottom: 0.5em;
-}
-
-// Info and errors
-// --------------------------
-.message-info {
-  border: 1px solid;
-  clear: both;
-  padding: 10px 20px;
-  color: @state-info-text;
-}
-
-.message-error {
-  clear: both;
-  color: @state-danger-text;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.message-success {
-  color: @state-success-text;
-  font-size: 1.3em;
-  font-weight: bold;
-  margin: 20px 0 10px 0;
-}
-
-.error {
-  color: @state-danger-text;
-}
-
-// Styles for validation helpers
-// --------------------------
-.validators {
-  font-style: normal;
-  padding-bottom: 0.5em;
-}
-
-.field-validation-error {
-  display: block;
-  padding-bottom: 0.5em;
-  color: @state-danger-text;
-  font-weight: bold;
-}
-
-.field-validation-valid {
-  display: none;
-}
-
-input.input-validation-error,
-textarea.input-validation-error,
-select.input-validation-error
-{
-  border: 1px solid @state-danger-border;
-  background-color: @state-danger-bg;
-  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-
-  &:focus {
-    border-color: @state-danger-border;
-    @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@state-danger-text, 20%);
-    .box-shadow(@shadow);
-  }
-}
-
-.validation-summary-errors {
-  color: @state-danger-text;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-
-.validation-summary-valid {
-  display: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/icons.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/icons.less
deleted file mode 100644
index 79b9d9e5..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/icons.less
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Icons
-// --------------------------------------------------
-
-
-.icon {
-  background: transparent url(../images/icons/32x32/social-media-icons-32.png) no-repeat scroll;
-  display: inline-block;
-  line-height: 0;
-  vertical-align: bottom;
-}
-
-.icon-32 {
-  height: 32px;
-  width: 32px;
-}
-
-.icon-facebook {
-  background-position: 0 0;
-}
-
-.icon-twitter {
-  background-position: 0 -32px;
-}
-
-.icon-linkedin {
-  background-position: 0 -64px;
-}
-
-.icon-rss {
-  background-position: 0 -128px;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/layout.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/layout.less
deleted file mode 100644
index 35a7f386..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/layout.less
+++ /dev/null
@@ -1,128 +0,0 @@
-html,
-body {
-  margin: 0;
-  height: 100%;
-  /* The html and body elements cannot have any padding or margin */
-}
-
-/* Wrapper for page content to push down footer */
-.l-wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  /* Negative indent footer by it's height */
-  margin: 0 auto (-1 * @footer-height);
-}
-
-.l-constrained {
-  margin: 0 auto;
-  padding-left: 20px;
-  padding-right: 20px;
-  max-width: 1200px;
-  min-width: 800px;
-}
-
-.l-header {
-  border-top: solid 10px @black;
-  border-bottom: 1px solid #d4b33a;
-  background-color: #f0db4f;
-
-  .l-constrained {
-    padding-top: 20px;
-    padding-bottom: 20px;
-    .clearfix();
-  }
-}
-
-.l-content {
-  .clearfix();
-}
-
-.l-main-content {
-  float: left;
-  width: 70%;
-}
-
-.l-sidebar {
-  float: right;
-  width: 30%;
-}
-
-/* Set the fixed height of the footer here */
-.l-push,
-.l-footer {
-  height: @footer-height;
-}
-
-.l-footer {
-  width: 100%;
-  background-color: @black;
-  color: @gray-lighter;
-  font-size: @font-size-small;
-  line-height: 100%;
-
-  .l-constrained {
-    padding-top: (@footer-height - 32) / 2;
-    .clearfix();
-  }
-
-  a {
-    color: @gray-lighter;
-    text-decoration: none;
-
-    &:hover,
-    &:active {
-      text-decoration: underline;
-    }
-  }
-}
-
-
-// Header
-// -------------------------
-
-.logo {
-  margin: 0;
-
-  a {
-    display: block;
-    float: left;
-    width: 100px;
-    height: 100px;
-    background: transparent url("../images/jsengineswitcher-logo.png") no-repeat scroll 0 0;
-    text-indent: -9999em;
-  }
-}
-
-.primary-nav {
-  position: relative;
-  left: 40px;
-  float: left;
-}
-
-
-// Footer
-// -------------------------
-
-.l-copyright {
-  float: left;
-    p {
-      margin: 0;
-      padding: 0;
-  }
-}
-
-.l-social {
-  float: right;
-
-  li {
-    display: inline;
-    list-style: none outside none;
-    padding-left: 10px;
-
-    a {
-      text-indent: -9999px;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/mixins.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/mixins.less
deleted file mode 100644
index d26eee79..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/mixins.less
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Mixins
-// --------------------------------------------------
-
-// NO Drop shadows
-.no-box-shadow {
-  -webkit-box-shadow: none; // iOS <4.3 & Android <4.1
-          box-shadow: none;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/navbar.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/navbar.less
deleted file mode 100644
index 95edf3c2..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/navbar.less
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Navbars
-// --------------------------------------------------
-
-
-// Wrapper and base class
-//
-// Provide a static navbar from which we expand to create full-width, fixed, and
-// other navbar variations.
-
-.navbar {
-  border: none;
-  border-radius: 0;
-}
-
-// Navbar nav links
-//
-// Builds on top of the `.nav` components with it's own modifier class to make
-// the nav the full height of the horizontal nav (above 768px).
-
-.navbar-nav {
-  float: left;
-  margin: 0 auto;
-
-  > li {
-    > a {
-      float: none;
-      // Vertically center the text given @navbar-height
-      padding: ((@navbar-height - @line-height-computed) / 2) 15px ((@navbar-height - @line-height-computed) / 2);
-      border: 1px solid transparent;
-      font-family: "Open Sans", sans-serif;
-      font-size: 2.0em;
-      text-decoration: none;
-      text-transform: uppercase;
-      outline: none;
-    }
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/page-socials.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/page-socials.less
deleted file mode 100644
index ea12dc09..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/page-socials.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.page-socials {
-  min-height: 60px;
-  margin-top: 20px;
-  padding-top: 15px;
-  border-top: 1px solid #b2b2b2;
-}
-
-.share-buttons {
-  li {
-    margin-right: 15px;
-    vertical-align: top;
-    line-height: normal;
-  }
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/type.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/type.less
deleted file mode 100644
index 02d69502..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/type.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Typography
-// --------------------------------------------------
-
-// Headings
-// -------------------------
-
-h1, h2, h3 {
-  margin-top: 10px;
-}
-
-h1, h2 {
-  line-height: 40px;
-}
-
-h2 {
-  color: @black;
-  font-weight: bold;
-}
-
-h3 {
-  color: @gray-dark;
-  line-height: @line-height-computed * 1.25;
-}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/variables.less b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/variables.less
deleted file mode 100644
index 498c9796..00000000
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore8.Mvc8/wwwroot/styles/variables.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// Colors
-// -------------------------
-@black:                 #1d0d0d;
-
-// Footer
-// -------------------------
-@footer-height:                    55px;
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Controllers/HomeController.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Controllers/HomeController.cs
new file mode 100644
index 00000000..57f376ff
--- /dev/null
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Controllers/HomeController.cs
@@ -0,0 +1,83 @@
+using System.Diagnostics;
+using System.Threading.Tasks;
+
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Html;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+
+using JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Models;
+using JavaScriptEngineSwitcher.Sample.Logic.Models;
+using JavaScriptEngineSwitcher.Sample.Logic.Services;
+
+namespace JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Controllers
+{
+	public class HomeController : Controller
+	{
+		private readonly FileContentService _fileContentService;
+		private readonly JsEvaluationService _jsEvaluationService;
+
+
+		public HomeController(
+			IConfigurationRoot configuration,
+			IWebHostEnvironment hostingEnvironment,
+			JsEvaluationService jsEvaluationService)
+		{
+			string textContentDirectoryPath = configuration
+				.GetSection("jsengineswitcher")
+				.GetSection("Samples")["TextContentDirectoryPath"]
+				;
+
+			_fileContentService = new FileContentService(textContentDirectoryPath, hostingEnvironment);
+			_jsEvaluationService = jsEvaluationService;
+		}
+
+
+		[ResponseCache(CacheProfileName = "CacheCompressedContent5Minutes")]
+		public IActionResult Index()
+		{
+			ViewBag.Body = new HtmlString(_fileContentService.GetFileContent("index.html"));
+
+			return View();
+		}
+
+		[HttpGet]
+		[ResponseCache(CacheProfileName = "CacheCompressedContent5Minutes")]
+		public IActionResult Demo()
+		{
+			var model = _jsEvaluationService.GetInitializationData();
+
+			return View(model);
+		}
+
+		[HttpPost]
+		public async Task Demo(JsEvaluationViewModel editedModel)
+		{
+			var model = _jsEvaluationService.GetInitializationData();
+			await TryUpdateModelAsync(model, string.Empty, m => m.EngineName, m=> m.Expression);
+
+			if (ModelState.IsValid)
+			{
+				model = _jsEvaluationService.Evaluate(model);
+
+				ModelState.Clear();
+			}
+
+			return View(model);
+		}
+
+		[ResponseCache(CacheProfileName = "CacheCompressedContent5Minutes")]
+		public IActionResult Contact()
+		{
+			ViewBag.Body = new HtmlString(_fileContentService.GetFileContent("contact.html"));
+
+			return View();
+		}
+
+		[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
+		public IActionResult Error()
+		{
+			return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
+		}
+	}
+}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.csproj
new file mode 100644
index 00000000..492f52cb
--- /dev/null
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.csproj
@@ -0,0 +1,49 @@
+
+
+  
+    JS Engine Switcher: Sample ASP.NET Core 9.0 MVC 9 Site
+    3.33.1
+    net9.0
+    enable
+    Exe
+    true
+    true
+    true
+    false
+  
+
+  
+
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+
+  
+
+
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Models/ErrorViewModel.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Models/ErrorViewModel.cs
new file mode 100644
index 00000000..20cc9827
--- /dev/null
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Models/ErrorViewModel.cs
@@ -0,0 +1,9 @@
+namespace JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Models
+{
+	public class ErrorViewModel
+	{
+		public string RequestId { get; set; }
+
+		public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+	}
+}
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Program.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Program.cs
new file mode 100644
index 00000000..457ccf63
--- /dev/null
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Program.cs
@@ -0,0 +1,105 @@
+using Jering.Javascript.NodeJS;
+using Microsoft.AspNetCore.Mvc;
+
+using JavaScriptEngineSwitcher.ChakraCore;
+using JavaScriptEngineSwitcher.Extensions.MsDependencyInjection;
+using JavaScriptEngineSwitcher.Jint;
+using JavaScriptEngineSwitcher.Jurassic;
+using JavaScriptEngineSwitcher.Msie;
+using JavaScriptEngineSwitcher.NiL;
+using JavaScriptEngineSwitcher.Node;
+using JavaScriptEngineSwitcher.Sample.Logic.Services;
+using JavaScriptEngineSwitcher.V8;
+using JavaScriptEngineSwitcher.Vroom;
+using JavaScriptEngineSwitcher.Yantra;
+
+var builder = WebApplication.CreateBuilder(new WebApplicationOptions() {
+	WebRootPath = Path.Combine(
+		Directory.GetCurrentDirectory(),
+		"../JavaScriptEngineSwitcher.Sample.AspNetCore.ClientSideAssets/wwwroot"
+	)
+});
+var env = builder.Environment;
+var configuration = new ConfigurationBuilder()
+	.SetBasePath(env.ContentRootPath)
+	.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
+	.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
+	.AddEnvironmentVariables()
+	.Build()
+	;
+
+#region Configure services
+
+IServiceCollection services = builder.Services;
+
+services.AddSingleton(configuration);
+
+// Add Jering Node.js service to the services container.
+services.AddNodeJS();
+
+// Add JavaScriptEngineSwitcher services to the services container.
+services.AddJsEngineSwitcher(options =>
+{
+	options.AllowCurrentProperty = false;
+	options.DefaultEngineName = ChakraCoreJsEngine.EngineName;
+})
+	.AddChakraCore()
+	.AddJint()
+	.AddJurassic()
+	.AddMsie(options =>
+	{
+		options.EngineMode = JsEngineMode.ChakraIeJsRt;
+	})
+	.AddNiL()
+	.AddNode(services)
+	.AddV8()
+	.AddVroom()
+	.AddYantra()
+	;
+
+services.Configure(options =>
+{
+	options.CacheProfiles.Add("CacheCompressedContent5Minutes",
+		new CacheProfile
+		{
+			NoStore = builder.Environment.IsDevelopment(),
+			Duration = 300,
+			Location = ResponseCacheLocation.Client,
+			VaryByHeader = "Accept-Encoding"
+		}
+	);
+});
+
+// Add framework services.
+services.AddControllersWithViews();
+
+// Add JavaScriptEngineSwitcher sample services to the services container.
+services.AddSingleton();
+
+#endregion
+
+#region Configure the HTTP request pipeline
+
+var app = builder.Build();
+
+if (app.Environment.IsDevelopment())
+{
+	app.UseDeveloperExceptionPage();
+}
+else
+{
+	app.UseExceptionHandler("/Home/Error");
+}
+
+app.UseRouting();
+
+app.MapStaticAssets();
+
+app.MapControllerRoute(
+	name: "default",
+	pattern: "{controller=Home}/{action=Index}/{id?}")
+	.WithStaticAssets();
+
+#endregion
+
+app.Run();
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Properties/launchSettings.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Properties/launchSettings.json
new file mode 100644
index 00000000..a94e92ed
--- /dev/null
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Properties/launchSettings.json
@@ -0,0 +1,38 @@
+{
+  "$schema": "https://json.schemastore.org/launchsettings.json",
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:53687/",
+      "sslPort": 44308
+    }
+  },
+  "profiles": {
+    "http": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      },
+      "dotnetRunMessages": true,
+      "applicationUrl": "http://localhost:5220"
+    },
+    "https": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      },
+      "dotnetRunMessages": true,
+      "applicationUrl": "https://localhost:7242;http://localhost:5220"
+    },
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    }
+  }
+}
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Contact.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Contact.cshtml
new file mode 100644
index 00000000..58785ebe
--- /dev/null
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Contact.cshtml
@@ -0,0 +1,8 @@
+@{
+	ViewBag.Title = "Contact";
+}
+
+
+

@ViewBag.Title

+ @ViewBag.Body +
\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Demo.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Demo.cshtml new file mode 100644 index 00000000..befb8f43 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Demo.cshtml @@ -0,0 +1,67 @@ +@using JavaScriptEngineSwitcher.Sample.Logic.Models +@using JavaScriptEngineSwitcher.Sample.Resources + +@model JsEvaluationViewModel + +@{ + ViewBag.Title = "Demo"; +} + +

@ViewBag.Title

+ +
+
+
+
+
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ + @if (Model.Result != null) + { +
+ @if (Model.Result.Errors.Count == 0) + { +
+ + +
+ } + else + { + await Html.RenderPartialAsync("_JsEvaluationErrorList", Model.Result.Errors); + } +
+ } +
+
+
+ +@section Scripts { + + + + + + + + + +} \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Index.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Index.cshtml new file mode 100644 index 00000000..a9c2cfb1 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Home/Index.cshtml @@ -0,0 +1,8 @@ +@{ + ViewBag.Title = string.Empty; +} + +
+

Project Description

+ @ViewBag.Body +
\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/Error.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/Error.cshtml new file mode 100644 index 00000000..b568b9f2 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/Error.cshtml @@ -0,0 +1,28 @@ +@using JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9.Models + +@model ErrorViewModel + +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/_JsEvaluationErrorList.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/_JsEvaluationErrorList.cshtml new file mode 100644 index 00000000..9e0601d6 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/_JsEvaluationErrorList.cshtml @@ -0,0 +1,23 @@ +@using JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.Helpers +@using JavaScriptEngineSwitcher.Sample.Logic.Models + +@model IList + +

Found @Model.Count error(s):

+
    + @foreach (var error in Model) + { +
  • + @error.EngineFullName
    + @if (error.LineNumber > 0) + { + Line @error.LineNumber, Column @error.ColumnNumber
    + } + @Html.EncodedReplace(@error.Message, "\n\r?", "
    ") + @if (!string.IsNullOrWhiteSpace(error.SourceFragment)) + { +
    @error.SourceFragment
    + } +
  • + } +
\ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/_Layout.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/_Layout.cshtml new file mode 100644 index 00000000..b595497f --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/Shared/_Layout.cshtml @@ -0,0 +1,107 @@ +@using JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure.TagHelpers + + + + + + + + + @if (!string.IsNullOrEmpty(ViewBag.Title)) {<text>@ViewBag.Title | </text>}JavaScriptEngineSwitcher Sample ASP.NET Core 9.0 MVC 9 Site + + + + + + + + + + + + +
+ + + + + +
+
+ @RenderBody() +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @await RenderSectionAsync("scripts", required: false) + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/_ViewImports.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/_ViewImports.cshtml new file mode 100644 index 00000000..dcad619c --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/_ViewImports.cshtml @@ -0,0 +1,2 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, JavaScriptEngineSwitcher.Sample.AspNetCore.Infrastructure \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/_ViewStart.cshtml b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/_ViewStart.cshtml new file mode 100644 index 00000000..817a9134 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/appsettings.Development.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/appsettings.Development.json new file mode 100644 index 00000000..0c208ae9 --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/appsettings.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/appsettings.json new file mode 100644 index 00000000..ed44b7ae --- /dev/null +++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore9.Mvc9/appsettings.json @@ -0,0 +1,15 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + + "JsEngineSwitcher": { + "Samples": { + "TextContentDirectoryPath": "../SharedData/text-content" + } + } +} diff --git a/samples/JavaScriptEngineSwitcher.Sample.Logic/JavaScriptEngineSwitcher.Sample.Logic.csproj b/samples/JavaScriptEngineSwitcher.Sample.Logic/JavaScriptEngineSwitcher.Sample.Logic.csproj index 3f1eb550..b37c5942 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.Logic/JavaScriptEngineSwitcher.Sample.Logic.csproj +++ b/samples/JavaScriptEngineSwitcher.Sample.Logic/JavaScriptEngineSwitcher.Sample.Logic.csproj @@ -2,11 +2,13 @@ JS Engine Switcher: Logic for Samples - 3.26.0 - net40;net451;net471;netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0 + 3.33.1 + net40;net451;net471;netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 1.6.0 Library true + $(NoWarn);NETSDK1215;NU1902;NU1903;NU1904 + false false false @@ -44,15 +46,23 @@ - + - + - + + + + + + + + + \ No newline at end of file diff --git a/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/FileContentService.cs b/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/FileContentService.cs index de909780..ddbd4b10 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/FileContentService.cs +++ b/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/FileContentService.cs @@ -88,7 +88,7 @@ private string GetPhysicalFilePath(string filePath) #endif string physicalFilePath = Path.Combine( applicationDirectoryPath, - filePath.Replace('/', '\\').TrimStart(new char[] { '\\' }) + filePath.Replace('/', '\\').TrimStart(['\\']) ); return physicalFilePath; diff --git a/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/JsEvaluationService.cs b/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/JsEvaluationService.cs index 2317ac51..1fc45bba 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/JsEvaluationService.cs +++ b/samples/JavaScriptEngineSwitcher.Sample.Logic/Services/JsEvaluationService.cs @@ -85,7 +85,7 @@ public JsEvaluationViewModel Evaluate(JsEvaluationViewModel model) } finally { - if (engine != null) + if (engine is not null) { engine.Dispose(); } diff --git a/samples/JavaScriptEngineSwitcher.Sample.Resources/JavaScriptEngineSwitcher.Sample.Resources.csproj b/samples/JavaScriptEngineSwitcher.Sample.Resources/JavaScriptEngineSwitcher.Sample.Resources.csproj index cd897452..03faf959 100644 --- a/samples/JavaScriptEngineSwitcher.Sample.Resources/JavaScriptEngineSwitcher.Sample.Resources.csproj +++ b/samples/JavaScriptEngineSwitcher.Sample.Resources/JavaScriptEngineSwitcher.Sample.Resources.csproj @@ -2,11 +2,13 @@ JS Engine Switcher: Resources for Samples - 3.26.0 + 3.33.1 net40-client;net45;net471;netstandard1.3;netstandard2.0 1.6.0 Library true + $(NoWarn);NETSDK1215;NU1903 + false true false diff --git a/samples/SharedData/text-content/contact.html b/samples/SharedData/text-content/contact.html index 5fef06d5..7b72dd94 100644 --- a/samples/SharedData/text-content/contact.html +++ b/samples/SharedData/text-content/contact.html @@ -9,7 +9,5 @@

Email

Personal Site

www.taritsyn.ru

-

Twitter

-

- -

\ No newline at end of file +

Mastodon

+

@taritsyn@fosstodon.org

\ No newline at end of file diff --git a/samples/SharedData/text-content/index.html b/samples/SharedData/text-content/index.html index bdf731bf..3f876a89 100644 --- a/samples/SharedData/text-content/index.html +++ b/samples/SharedData/text-content/index.html @@ -1,2 +1,2 @@ -

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines (ChakraCore, Jint, Jurassic, MSIE JavaScript Engine for .NET, NiL.JS, Jering.Javascript.NodeJS, Microsoft ClearScript.V8, VroomJs and YantraJS). This library allows you to quickly and easily switch to using of another JavaScript engine.

+

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines (ChakraCore, Jint, Jurassic, MSIE JavaScript Engine for .NET, NiL.JS, Jering.Javascript.NodeJS, Microsoft ClearScript.V8, VroomJs and YantraJS). This library allows you to quickly and easily switch to using of another JavaScript engine.

JavaScript Engine Switcher was created and is maintained by Andrey Taritsyn.

\ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj b/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj index 2196dd30..7a1a7826 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: ChakraCore for Linux (x64) - 3.26.0 + 3.31.0 netstandard2.0 @@ -15,7 +15,7 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png This package complements the JavaScriptEngineSwitcher.ChakraCore package and contains the native implementation of ChakraCore for Linux (x64). $(PackageCommonTags);ChakraCore;Linux;x64 - ChakraCore was updated to version of April 21, 2024. + ChakraCore was updated to version of February 19, 2026. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/PACKAGE-DESCRIPTION.md index 79faa639..8784054f 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/PACKAGE-DESCRIPTION.md @@ -1,3 +1,3 @@ -This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of April 21, 2024 for Linux (x64). +This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of February 19, 2026 for Linux (x64). This package is only compatible with .NET Core. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/readme.txt index 6e77dbaa..8316dd56 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/readme.txt @@ -1,18 +1,18 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore for Linux x64 v3.26.0 + README file for JS Engine Switcher: ChakraCore for Linux x64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== This package complements the JavaScriptEngineSwitcher.ChakraCore package and - contains the native implementation of ChakraCore version of April 21, 2024 + contains the native implementation of ChakraCore version of February 19, 2026 for Linux (x64). This package is only compatible with .NET Core. @@ -20,7 +20,7 @@ ============= RELEASE NOTES ============= - ChakraCore was updated to version of April 21, 2024. + ChakraCore was updated to version of February 19, 2026. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.csproj b/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.csproj index 01023ff3..e39d026c 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: ChakraCore for OS X (x64) - 3.26.0 + 3.31.0 netstandard2.0 @@ -15,7 +15,7 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png This package complements the JavaScriptEngineSwitcher.ChakraCore package and contains the native implementation of ChakraCore for OS X (x64). $(PackageCommonTags);ChakraCore;macOS;OSX;x64 - ChakraCore was updated to version of April 21, 2024. + ChakraCore was updated to version of February 19, 2026. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/PACKAGE-DESCRIPTION.md index 026d8e23..f449a2b8 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/PACKAGE-DESCRIPTION.md @@ -1,3 +1,3 @@ -This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of April 21, 2024 for OS X (x64). +This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of February 19, 2026 for OS X (x64). This package is only compatible with .NET Core. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/readme.txt index baa8627f..5be5329e 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/readme.txt @@ -1,18 +1,18 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore for OS X x64 v3.26.0 + README file for JS Engine Switcher: ChakraCore for OS X x64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== This package complements the JavaScriptEngineSwitcher.ChakraCore package and - contains the native implementation of ChakraCore version of April 21, 2024 + contains the native implementation of ChakraCore version of February 19, 2026 for OS X (x64). This package is only compatible with .NET Core. @@ -20,7 +20,7 @@ ============= RELEASE NOTES ============= - ChakraCore was updated to version of April 21, 2024. + ChakraCore was updated to version of February 19, 2026. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj index e7fb6189..4a38d22f 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: ChakraCore for Windows (ARM) - 3.26.0 + 3.31.0 netstandard2.0 @@ -15,8 +15,7 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png This package complements the JavaScriptEngineSwitcher.ChakraCore package and contains the native implementation of ChakraCore for Windows (ARM). $(PackageCommonTags);ChakraCore;Windows;ARM - 1. ChakraCore was updated to version of April 21, 2024. -2. An additional deployment mechanism has been added to MSBuild script for the case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/PACKAGE-DESCRIPTION.md index 7e840fcd..ca651812 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/PACKAGE-DESCRIPTION.md @@ -1,3 +1,3 @@ -This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of April 21, 2024 for Windows (ARM). +This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of February 19, 2026 for Windows (ARM). This package is only compatible with .NET Core and .NET Framework 4.5. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/readme.txt index de4a1475..96e5a754 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm/readme.txt @@ -1,18 +1,18 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore for Windows ARM v3.26.0 + README file for JS Engine Switcher: ChakraCore for Windows ARM v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== This package complements the JavaScriptEngineSwitcher.ChakraCore package and - contains the native implementation of ChakraCore version of April 21, 2024 + contains the native implementation of ChakraCore version of February 19, 2026 for Windows (ARM). This package is only compatible with .NET Core and .NET Framework 4.5. @@ -20,9 +20,7 @@ ============= RELEASE NOTES ============= - 1. ChakraCore was updated to version of April 21, 2024. - 2. An additional deployment mechanism has been added to MSBuild script for the - case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj index c6f9c247..d4e2af6f 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: ChakraCore for Windows (ARM64) - 3.26.0 + 3.31.0 netstandard2.0 @@ -15,8 +15,7 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png This package complements the JavaScriptEngineSwitcher.ChakraCore package and contains the native implementation of ChakraCore for Windows (ARM64). $(PackageCommonTags);ChakraCore;Windows;ARM64 - 1. ChakraCore was updated to version of April 21, 2024. -2. An additional deployment mechanism has been added to MSBuild script for the case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/PACKAGE-DESCRIPTION.md index 221e89f3..731c5803 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/PACKAGE-DESCRIPTION.md @@ -1,3 +1,3 @@ -This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of April 21, 2024 for Windows (ARM64). +This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of February 19, 2026 for Windows (ARM64). This package is only compatible with .NET Core and .NET Framework 4.5. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/readme.txt index c8d2a7da..2db4571a 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64/readme.txt @@ -1,18 +1,18 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore for Windows ARM64 v3.26.0 + README file for JS Engine Switcher: ChakraCore for Windows ARM64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== This package complements the JavaScriptEngineSwitcher.ChakraCore package and - contains the native implementation of ChakraCore version of April 21, 2024 + contains the native implementation of ChakraCore version of February 19, 2026 for Windows (ARM64). This package is only compatible with .NET Core and .NET Framework 4.5. @@ -20,9 +20,7 @@ ============= RELEASE NOTES ============= - 1. ChakraCore was updated to version of April 21, 2024. - 2. An additional deployment mechanism has been added to MSBuild script for the - case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.csproj b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.csproj index 43d6c0f7..6fb77a52 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: ChakraCore for Windows (x64) - 3.26.0 + 3.31.0 netstandard2.0 @@ -15,8 +15,7 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png This package complements the JavaScriptEngineSwitcher.ChakraCore package and contains the native implementation of ChakraCore for Windows (x64). $(PackageCommonTags);ChakraCore;Windows;x64 - 1. ChakraCore was updated to version of April 21, 2024. -2. An additional deployment mechanism has been added to MSBuild script for the case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/PACKAGE-DESCRIPTION.md index 855ea972..423cec52 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/PACKAGE-DESCRIPTION.md @@ -1 +1 @@ -This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of April 21, 2024 for Windows (x64). \ No newline at end of file +This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of February 19, 2026 for Windows (x64). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/readme.txt index 9b0ed6a8..7c48b512 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x64/readme.txt @@ -1,26 +1,24 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore for Windows x64 v3.26.0 + README file for JS Engine Switcher: ChakraCore for Windows x64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== This package complements the JavaScriptEngineSwitcher.ChakraCore package and - contains the native implementation of ChakraCore version of April 21, 2024 + contains the native implementation of ChakraCore version of February 19, 2026 for Windows (x64). ============= RELEASE NOTES ============= - 1. ChakraCore was updated to version of April 21, 2024. - 2. An additional deployment mechanism has been added to MSBuild script for the - case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86.csproj b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86.csproj index 51ff71f0..235a3585 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: ChakraCore for Windows (x86) - 3.26.0 + 3.31.0 netstandard2.0 @@ -15,8 +15,7 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png This package complements the JavaScriptEngineSwitcher.ChakraCore package and contains the native implementation of ChakraCore for Windows (x86). $(PackageCommonTags);ChakraCore;Windows;x86 - 1. ChakraCore was updated to version of April 21, 2024. -2. An additional deployment mechanism has been added to MSBuild script for the case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/PACKAGE-DESCRIPTION.md index 8f294f08..5b238367 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/PACKAGE-DESCRIPTION.md @@ -1 +1 @@ -This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of April 21, 2024 for Windows (x86). \ No newline at end of file +This package complements the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore) package and contains the native implementation of [ChakraCore](https://github.com/chakra-core/ChakraCore) version of February 19, 2026 for Windows (x86). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/readme.txt index a5f09bbe..1b754000 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore.Native.win-x86/readme.txt @@ -1,26 +1,24 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore for Windows x86 v3.26.0 + README file for JS Engine Switcher: ChakraCore for Windows x86 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== This package complements the JavaScriptEngineSwitcher.ChakraCore package and - contains the native implementation of ChakraCore version of April 21, 2024 + contains the native implementation of ChakraCore version of February 19, 2026 for Windows (x86). ============= RELEASE NOTES ============= - 1. ChakraCore was updated to version of April 21, 2024. - 2. An additional deployment mechanism has been added to MSBuild script for the - case when the target platform is focused on a specific processor architecture. + ChakraCore was updated to version of February 19, 2026. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCoreJsEngine.cs b/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCoreJsEngine.cs index 6d6febce..9db4beee 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCoreJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCoreJsEngine.cs @@ -1,5 +1,5 @@ using System; -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Runtime.InteropServices; #endif using System.Text; @@ -53,7 +53,7 @@ public sealed class ChakraCoreJsEngine : JsEngineBase /// /// Version of original JS engine /// - private const string EngineVersion = "Apr 21, 2024"; + private const string EngineVersion = "Feb 19, 2026"; /// /// Instance of JS runtime @@ -94,7 +94,7 @@ public sealed class ChakraCoreJsEngine : JsEngineBase /// /// Synchronizer of JS engine initialization /// - private static readonly object _initializationSynchronizer = new object(); + private static readonly Lock _initializationSynchronizer = new Lock(); /// /// Flag indicating whether the JS engine is initialized @@ -316,7 +316,7 @@ private WrapperException WrapJsException(OriginalException originalException, string sourceFragment = string.Empty; var originalScriptException = originalException as OriginalScriptException; - if (originalScriptException != null) + if (originalScriptException is not null) { JsValue metadataValue = originalScriptException.Metadata; @@ -427,14 +427,11 @@ private WrapperException WrapJsException(OriginalException originalException, string messageWithTypeAndCallStack = stackPropertyValue.ValueType == JsValueType.String ? stackPropertyValue.ToString() : string.Empty; string messageWithType = errorValue.ConvertToString().ToString(); - string rawCallStack = messageWithTypeAndCallStack - .TrimStart(messageWithType) - .TrimStart("Error") - .TrimStart(new char[] { '\n', '\r' }) - ; + string rawCallStack = CoreErrorHelpers.GetErrorLocationFromMessage( + messageWithTypeAndCallStack, messageWithType); string callStackWithSourceFragment = string.Empty; - ErrorLocationItem[] callStackItems = CoreErrorHelpers.ParseErrorLocation(rawCallStack); + if (callStackItems.Length > 0) { ErrorLocationItem firstCallStackItem = callStackItems[0]; @@ -782,7 +779,7 @@ protected override void InnerExecute(string code, string documentName) protected override void InnerExecute(IPrecompiledScript precompiledScript) { var chakraCorePrecompiledScript = precompiledScript as ChakraCorePrecompiledScript; - if (chakraCorePrecompiledScript == null) + if (chakraCorePrecompiledScript is null) { throw new WrapperUsageException( string.Format(CoreStrings.Usage_CannotConvertPrecompiledScriptToInternalType, @@ -1099,7 +1096,7 @@ private void Dispose(bool disposing) { if (_disposedFlag.Set()) { - if (_dispatcher != null) + if (_dispatcher is not null) { _dispatcher.Invoke(DisposeUnmanagedResources); @@ -1107,7 +1104,7 @@ private void Dispose(bool disposing) _dispatcher = null; } - if (_typeMapper != null) + if (_typeMapper is not null) { _typeMapper.Dispose(); _typeMapper = null; diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCorePrecompiledScript.cs b/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCorePrecompiledScript.cs index f9bf6583..b95901bc 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCorePrecompiledScript.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/ChakraCorePrecompiledScript.cs @@ -45,7 +45,7 @@ internal sealed class ChakraCorePrecompiledScript : IPrecompiledScript /// /// Synchronizer of the script source code loading /// - private readonly object _scriptLoadingSynchronizer = new object(); + private readonly Lock _scriptLoadingSynchronizer = new Lock(); /// /// Gets a source code of the script @@ -117,11 +117,11 @@ public ChakraCorePrecompiledScript(string code, JsParseScriptAttributes parseAtt private bool LoadScriptSourceCode(JsSourceContext sourceContext, out JsValue value, out JsParseScriptAttributes parseAttributes) { - if (_codeBytes == null) + if (_codeBytes is null) { lock (_scriptLoadingSynchronizer) { - if (_codeBytes == null) + if (_codeBytes is null) { Encoding encoding = _parseAttributes.HasFlag(JsParseScriptAttributes.ArrayBufferIsUtf16Encoded) ? Encoding.Unicode : Encoding.UTF8; diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/GlobalUsings.cs b/src/JavaScriptEngineSwitcher.ChakraCore/GlobalUsings.cs new file mode 100644 index 00000000..70bfca9c --- /dev/null +++ b/src/JavaScriptEngineSwitcher.ChakraCore/GlobalUsings.cs @@ -0,0 +1,5 @@ +#if NET10_0_OR_GREATER +global using Lock = System.Threading.Lock; +#else +global using Lock = System.Object; +#endif \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/EncodingHelpers.cs b/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/EncodingHelpers.cs index 31eb06e1..c54150e8 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/EncodingHelpers.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/EncodingHelpers.cs @@ -1,4 +1,4 @@ -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Buffers; #endif using System.Text; @@ -38,7 +38,7 @@ public static string UnicodeToAnsi(string value, out int byteCount) try { -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER result = ConvertStringInternal(utf8Encoding, ansiEncoding, value, valueLength, buffer, bufferLength); #else utf8Encoding.GetBytes(value, 0, valueLength, buffer, 0); @@ -54,7 +54,7 @@ public static string UnicodeToAnsi(string value, out int byteCount) return result; } -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER private static unsafe string ConvertStringInternal(Encoding srcEncoding, Encoding dstEncoding, string s, int charCount, byte[] bytes, int byteCount) diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/ReflectionHelpers.cs b/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/ReflectionHelpers.cs index 91099f72..c6cba10b 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/ReflectionHelpers.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/Helpers/ReflectionHelpers.cs @@ -1,7 +1,14 @@ using System; +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER +using System.Buffers; +#endif using System.Collections.Generic; using System.Linq; using System.Reflection; +#if NET40 + +using PolyfillsForOldDotNet.System.Buffers; +#endif using JavaScriptEngineSwitcher.Core.Utilities; @@ -13,16 +20,16 @@ namespace JavaScriptEngineSwitcher.ChakraCore.Helpers internal static class ReflectionHelpers { private static readonly PropertyInfo[] _disallowedProperties = - { + [ typeof(Delegate).GetProperty("Method"), typeof(Exception).GetProperty("TargetSite") - }; + ]; private static readonly MethodInfo[] _disallowedMethods = - { + [ typeof(object).GetMethod("GetType"), typeof(Exception).GetMethod("GetType") - }; + ]; public static BindingFlags GetDefaultBindingFlags(bool instance) @@ -70,7 +77,7 @@ public static bool IsFullyFledgedMethod(MethodInfo method) public static void FixFieldValueType(ref object value, FieldInfo field) { - if (value == null) + if (value is null) { return; } @@ -91,7 +98,7 @@ public static void FixFieldValueType(ref object value, FieldInfo field) public static void FixPropertyValueType(ref object value, PropertyInfo property) { - if (value == null) + if (value is null) { return; } @@ -113,6 +120,11 @@ public static void FixPropertyValueType(ref object value, PropertyInfo property) public static void FixArgumentTypes(ref object[] argValues, ParameterInfo[] parameters) { int argCount = argValues.Length; + if (argCount == 0) + { + return; + } + int parameterCount = parameters.Length; for (int argIndex = 0; argIndex < argCount; argIndex++) @@ -123,7 +135,7 @@ public static void FixArgumentTypes(ref object[] argValues, ParameterInfo[] para } object argValue = argValues[argIndex]; - if (argValue == null) + if (argValue is null) { continue; } @@ -147,54 +159,71 @@ public static void FixArgumentTypes(ref object[] argValues, ParameterInfo[] para public static MethodBase GetBestFitMethod(MethodBase[] methods, object[] argValues) { - MethodWithMetadata[] methodCandidates = methods - .Select(m => new MethodWithMetadata - { - Method = m, - ParameterTypes = m.GetParameters() - .Select(p => p.ParameterType) - .ToArray() - }) - .ToArray() - ; - int argCount = argValues.Length; - MethodWithMetadata[] sameArityMethods = methodCandidates - .Where(m => m.ParameterTypes.Length == argCount) - .ToArray() - ; - - int sameArityMethodCount = sameArityMethods.Length; - if (sameArityMethodCount == 0) + int methodCount = methods.Length; + if (methodCount == 0) { return null; } - Type[] argTypes = argValues - .Select(a => a != null ? a.GetType() : typeof(object)) - .ToArray() - ; - var compatibleMethods = new List(); - - for (int methodIndex = 0; methodIndex < sameArityMethodCount; methodIndex++) + if (methodCount == 1) { - MethodWithMetadata method = sameArityMethods[methodIndex]; - ushort compatibilityScore; + MethodBase method = methods[0]; + ParameterInfo[] parameters = method.GetParameters(); - if (CompareParameterTypes(argValues, argTypes, method.ParameterTypes, out compatibilityScore)) + MethodBase bestFitMethod = null; + if (CompareParameterTypes(argValues, parameters, out _)) { - method.CompatibilityScore = compatibilityScore; - compatibleMethods.Add(method); + bestFitMethod = method; } + + return bestFitMethod; } - int compatibleMethodCount = compatibleMethods.Count; - if (compatibleMethodCount > 0) + MethodWithMetadata[] compatibleMethods = null; + int compatibleMethodCount = 0; + + var methodArrayPool = ArrayPool.Shared; + MethodWithMetadata[] buffer = methodArrayPool.Rent(methodCount); + + try { - if (compatibleMethodCount == 1) + foreach (MethodBase method in methods) + { + ParameterInfo[] parameters = method.GetParameters(); + ushort compatibilityScore; + + if (CompareParameterTypes(argValues, parameters, out compatibilityScore)) + { + compatibleMethodCount++; + + int compatibleMethodIndex = compatibleMethodCount - 1; + buffer[compatibleMethodIndex] = new MethodWithMetadata + { + Method = method, + CompatibilityScore = compatibilityScore + }; + } + } + + if (compatibleMethodCount > 0) { - return compatibleMethods[0].Method; + if (compatibleMethodCount == 1) + { + return buffer[0].Method; + } + + compatibleMethods = new MethodWithMetadata[compatibleMethodCount]; + Array.Copy(buffer, compatibleMethods, compatibleMethodCount); } + } + finally + { + bool clearArray = compatibleMethodCount > 0; + methodArrayPool.Return(buffer, clearArray); + } + if (compatibleMethods is not null) + { MethodWithMetadata bestFitMethod = compatibleMethods .OrderByDescending(m => m.CompatibilityScore) .First() @@ -206,24 +235,29 @@ public static MethodBase GetBestFitMethod(MethodBase[] methods, object[] argValu return null; } - private static bool CompareParameterTypes(object[] argValues, Type[] argTypes, Type[] parameterTypes, + private static bool CompareParameterTypes(object[] argValues, ParameterInfo[] parameters, out ushort compatibilityScore) { - int argValueCount = argValues.Length; - int argTypeCount = argTypes.Length; - int parameterCount = parameterTypes.Length; + int argCount = argValues.Length; + int parameterCount = parameters.Length; compatibilityScore = 0; - if (argValueCount != argTypeCount || argTypeCount != parameterCount) + if (argCount != parameterCount) { return false; } + else if (argCount == 0) + { + compatibilityScore = ushort.MaxValue; + return true; + } - for (int argIndex = 0; argIndex < argValueCount; argIndex++) + for (int argIndex = 0; argIndex < argCount; argIndex++) { object argValue = argValues[argIndex]; - Type argType = argTypes[argIndex]; - Type parameterType = parameterTypes[argIndex]; + Type argType = argValue is not null ? argValue.GetType() : typeof(object); + ParameterInfo parameter = parameters[argIndex]; + Type parameterType = parameter.ParameterType; if (argType == parameterType) { @@ -239,8 +273,6 @@ private static bool CompareParameterTypes(object[] argValues, Type[] argTypes, T { return false; } - - continue; } } @@ -262,11 +294,11 @@ private MemberComparer() public override bool Equals(T x, T y) { - if (x == null && y == null) + if (x is null && y is null) { return true; } - else if (x == null || y == null) + else if (x is null || y is null) { return false; } @@ -283,7 +315,7 @@ public override bool Equals(T x, T y) public override int GetHashCode(T obj) { - return obj != null ? obj.GetHashCode() : 0; + return obj is not null ? obj.GetHashCode() : 0; } #endregion @@ -297,12 +329,6 @@ public MethodBase Method set; } - public Type[] ParameterTypes - { - get; - set; - } - /// TODO: In future will need to change type to double public ushort CompatibilityScore { diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JavaScriptEngineSwitcher.ChakraCore.csproj b/src/JavaScriptEngineSwitcher.ChakraCore/JavaScriptEngineSwitcher.ChakraCore.csproj index 82254fe1..39dd3ab4 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JavaScriptEngineSwitcher.ChakraCore.csproj +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JavaScriptEngineSwitcher.ChakraCore.csproj @@ -2,13 +2,14 @@ JS Engine Switcher: ChakraCore - 3.26.0 - net40-client;net45;net471;netstandard1.3;netstandard2.0;netstandard2.1 + 3.31.0 + net40-client;net45;net471;netstandard1.3;netstandard2.0;netstandard2.1;net10.0 1.6.0 Library true true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NETSDK1215;NU1903 + false true true @@ -23,7 +24,12 @@ ../../Icons/JavaScriptEngineSwitcher_ChakraCore_Logo128x128.png JavaScriptEngineSwitcher.ChakraCore contains a `ChakraCoreJsEngine` adapter (wrapper for the ChakraCore). $(PackageCommonTags);ChakraCore - ChakraCore was updated to version of April 21, 2024. + 1. ChakraCore was updated to version of February 19, 2026; +2. The value of a read-only field in an embedded object or type can no longer be changed; +3. Performed a migration to the modern C# null/not-null checks; +4. Added support for .NET 10; +5. In the `lock` statements for .NET 10 target now uses a instances of the `System.Threading.Lock` class; +6. Reduced a memory allocation by using collection expressions. @@ -33,8 +39,8 @@ - - + + diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsEngineFactoryCollectionExtensions.cs index ad6b2b02..b65c4968 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddChakraCore(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddChakraCore(this JsEngineFactoryCollec public static JsEngineFactoryCollection AddChakraCore(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -60,12 +60,12 @@ public static JsEngineFactoryCollection AddChakraCore(this JsEngineFactoryCollec /// Instance of public static JsEngineFactoryCollection AddChakraCore(this JsEngineFactoryCollection source, ChakraCoreSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedItem.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedItem.cs index d9870598..1faf220d 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedItem.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedItem.cs @@ -106,7 +106,7 @@ public void Dispose() _hostObject = null; IList nativeFunctions = _nativeFunctions; - if (nativeFunctions != null) + if (nativeFunctions is not null) { nativeFunctions.Clear(); _nativeFunctions = null; diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedObjectKey.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedObjectKey.cs index 29033978..191ca475 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedObjectKey.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/Embedding/EmbeddedObjectKey.cs @@ -53,7 +53,7 @@ public bool Equals(EmbeddedObjectKey other) bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) { - if (other == null || !(other is EmbeddedObjectKey)) + if (other is null || !(other is EmbeddedObjectKey)) { return false; } @@ -75,7 +75,7 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) int IComparable.CompareTo(object other) { - if (other == null) + if (other is null) { return 1; } @@ -112,7 +112,7 @@ public int CompareTo(EmbeddedObjectKey other) int IStructuralComparable.CompareTo(object other, IComparer comparer) { - if (other == null) + if (other is null) { return 1; } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsEngineException.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsEngineException.cs index 5bdbd2bf..fbd363c7 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsEngineException.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsEngineException.cs @@ -37,6 +37,9 @@ public JsEngineException(JsErrorCode errorCode, string message) /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsEngineException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsException.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsException.cs index 3577c8bf..cb7ae3f0 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsException.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsException.cs @@ -1,8 +1,10 @@ using System; #if !NETSTANDARD1_3 using System.Runtime.Serialization; +#if !NET10_0_OR_GREATER using System.Security.Permissions; #endif +#endif namespace JavaScriptEngineSwitcher.ChakraCore.JsRt { @@ -54,10 +56,13 @@ public JsException(JsErrorCode errorCode, string message) /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif protected JsException(SerializationInfo info, StreamingContext context) : base(info, context) { - if (info != null) + if (info is not null) { _errorCode = (JsErrorCode)info.GetUInt32("ErrorCode"); } @@ -71,10 +76,14 @@ protected JsException(SerializationInfo info, StreamingContext context) /// /// The to populate with data /// The destination (see ) for this serialization +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#else [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info == null) + if (info is null) { throw new ArgumentNullException(nameof(info)); } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsFatalException.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsFatalException.cs index d9e42100..a56ea24e 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsFatalException.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsFatalException.cs @@ -37,6 +37,9 @@ public JsFatalException(JsErrorCode errorCode, string message) /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsFatalException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsPropertyId.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsPropertyId.cs index 9382d237..cc470560 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsPropertyId.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsPropertyId.cs @@ -1,5 +1,5 @@ using System; -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Buffers; using System.Runtime.InteropServices; #endif diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsScriptException.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsScriptException.cs index 0d96043f..591a5492 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsScriptException.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsScriptException.cs @@ -66,6 +66,9 @@ internal JsScriptException(JsErrorCode errorCode, JsValue metadata, string messa /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsScriptException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsUsageException.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsUsageException.cs index cbaf2d48..a193a379 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsUsageException.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsUsageException.cs @@ -37,6 +37,9 @@ public JsUsageException(JsErrorCode errorCode, string message) /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsUsageException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsValue.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsValue.cs index dded5494..e741f2d7 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsValue.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/JsValue.cs @@ -1,5 +1,5 @@ using System; -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Buffers; #endif using System.Runtime.InteropServices; @@ -263,7 +263,7 @@ public byte[] ArrayBufferBytes if (bufferLength == 0) { - return new byte[0]; + return []; } var buffer = new byte[bufferLength]; @@ -450,7 +450,7 @@ public static JsValue CreateArray(uint length) /// The new ArrayBuffer object public static JsValue CreateExternalArrayBuffer(byte[] buffer) { - if (buffer == null) + if (buffer is null) { throw new ArgumentNullException(nameof(buffer)); } diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/TypeMapper.cs b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/TypeMapper.cs index 3fef5501..10bc6149 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/TypeMapper.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/JsRt/TypeMapper.cs @@ -49,7 +49,7 @@ internal sealed class TypeMapper : IDisposable /// /// Synchronizer of embedded object storage's initialization /// - private readonly object _embeddedObjectStorageInitializationSynchronizer = new object(); + private readonly Lock _embeddedObjectStorageInitializationSynchronizer = new Lock(); /// /// Flag indicating whether the embedded object storage is initialized @@ -69,7 +69,7 @@ internal sealed class TypeMapper : IDisposable /// /// Synchronizer of embedded type storage's initialization /// - private readonly object _embeddedTypeStorageInitializationSynchronizer = new object(); + private readonly Lock _embeddedTypeStorageInitializationSynchronizer = new Lock(); /// /// Flag indicating whether the embedded type storage is initialized @@ -159,7 +159,7 @@ public JsValue GetOrCreateScriptType(Type type) /// The mapped value public JsValue MapToScriptType(object value) { - if (value == null) + if (value is null) { return JsValue.Null; } @@ -258,7 +258,7 @@ public object MapToHostType(JsValue value) private EmbeddedObject CreateEmbeddedObjectOrFunction(object obj) { var del = obj as Delegate; - EmbeddedObject embeddedObject = del != null ? + EmbeddedObject embeddedObject = del is not null ? CreateEmbeddedFunction(del) : CreateEmbeddedObject(obj); return embeddedObject; @@ -307,7 +307,7 @@ private EmbeddedObject CreateEmbeddedFunction(Delegate del) JsValue undefinedValue = JsValue.Undefined; Exception exception = UnwrapException(e); var wrapperException = exception as WrapperException; - JsValue errorValue = wrapperException != null ? + JsValue errorValue = wrapperException is not null ? CreateErrorFromWrapperException(wrapperException) : JsErrorHelpers.CreateError(string.Format( @@ -330,8 +330,7 @@ private EmbeddedObject CreateEmbeddedFunction(Delegate del) JsValue functionValue = JsValue.CreateFunction(nativeFunction); SetNonEnumerableProperty(functionValue, ExternalObjectPropertyName, objValue); - var embeddedObject = new EmbeddedObject(del, functionValue, - new List { nativeFunction }); + var embeddedObject = new EmbeddedObject(del, functionValue, [nativeFunction]); return embeddedObject; } @@ -347,7 +346,7 @@ private void EmbeddedObjectFinalizeCallback(IntPtr ptr) object obj = objHandle.Target; var lazyEmbeddedObjects = _lazyEmbeddedObjects; - if (obj != null && lazyEmbeddedObjects != null) + if (obj is not null && lazyEmbeddedObjects is not null) { var embeddedObjectKey = new EmbeddedObjectKey(obj); Lazy lazyEmbeddedObject; @@ -396,7 +395,7 @@ private EmbeddedType CreateEmbeddedType(Type type) var bestFitConstructor = (ConstructorInfo)ReflectionHelpers.GetBestFitMethod( constructors, processedArgs); - if (bestFitConstructor == null) + if (bestFitConstructor is null) { CreateAndSetReferenceError(string.Format( Strings.Runtime_SuitableConstructorOfHostTypeNotFound, typeName)); @@ -413,7 +412,7 @@ private EmbeddedType CreateEmbeddedType(Type type) { Exception exception = UnwrapException(e); var wrapperException = exception as WrapperException; - JsValue errorValue = wrapperException != null ? + JsValue errorValue = wrapperException is not null ? CreateErrorFromWrapperException(wrapperException) : JsErrorHelpers.CreateError(string.Format( @@ -459,7 +458,7 @@ private void EmbeddedTypeFinalizeCallback(IntPtr ptr) string embeddedTypeKey = type.AssemblyQualifiedName; var lazyEmbeddedTypes = _lazyEmbeddedTypes; - if (!string.IsNullOrEmpty(embeddedTypeKey) && lazyEmbeddedTypes != null) + if (!string.IsNullOrEmpty(embeddedTypeKey) && lazyEmbeddedTypes is not null) { Lazy lazyEmbeddedType; @@ -495,7 +494,7 @@ private void ProjectFields(EmbeddedItem externalItem) { JsValue undefinedValue = JsValue.Undefined; - if (instance && obj == null) + if (instance && obj is null) { CreateAndSetTypeError(string.Format( Strings.Runtime_InvalidThisContextForHostObjectField, fieldName)); @@ -514,7 +513,7 @@ private void ProjectFields(EmbeddedItem externalItem) var wrapperException = exception as WrapperException; JsValue errorValue; - if (wrapperException != null) + if (wrapperException is not null) { errorValue = CreateErrorFromWrapperException(wrapperException); } @@ -543,56 +542,59 @@ private void ProjectFields(EmbeddedItem externalItem) JsValue getMethodValue = JsValue.CreateFunction(nativeGetFunction); descriptorValue.SetProperty("get", getMethodValue, true); - JsNativeFunction nativeSetFunction = (callee, isConstructCall, args, argCount, callbackData) => + if (!field.IsInitOnly) { - JsValue undefinedValue = JsValue.Undefined; - - if (instance && obj == null) + JsNativeFunction nativeSetFunction = (callee, isConstructCall, args, argCount, callbackData) => { - CreateAndSetTypeError(string.Format( - Strings.Runtime_InvalidThisContextForHostObjectField, fieldName)); - return undefinedValue; - } + JsValue undefinedValue = JsValue.Undefined; - object value = MapToHostType(args[1]); - ReflectionHelpers.FixFieldValueType(ref value, field); + if (instance && obj is null) + { + CreateAndSetTypeError(string.Format( + Strings.Runtime_InvalidThisContextForHostObjectField, fieldName)); + return undefinedValue; + } - try - { - field.SetValue(obj, value); - } - catch (Exception e) - { - Exception exception = UnwrapException(e); - var wrapperException = exception as WrapperException; - JsValue errorValue; + object value = MapToHostType(args[1]); + ReflectionHelpers.FixFieldValueType(ref value, field); - if (wrapperException != null) + try { - errorValue = CreateErrorFromWrapperException(wrapperException); + field.SetValue(obj, value); } - else + catch (Exception e) { - string errorMessage = instance ? - string.Format(Strings.Runtime_HostObjectFieldSettingFailed, fieldName, - exception.Message) - : - string.Format(Strings.Runtime_HostTypeFieldSettingFailed, fieldName, typeName, - exception.Message) - ; - errorValue = JsErrorHelpers.CreateError(errorMessage); + Exception exception = UnwrapException(e); + var wrapperException = exception as WrapperException; + JsValue errorValue; + + if (wrapperException is not null) + { + errorValue = CreateErrorFromWrapperException(wrapperException); + } + else + { + string errorMessage = instance ? + string.Format(Strings.Runtime_HostObjectFieldSettingFailed, fieldName, + exception.Message) + : + string.Format(Strings.Runtime_HostTypeFieldSettingFailed, fieldName, typeName, + exception.Message) + ; + errorValue = JsErrorHelpers.CreateError(errorMessage); + } + JsContext.SetException(errorValue); + + return undefinedValue; } - JsContext.SetException(errorValue); return undefinedValue; - } - - return undefinedValue; - }; - nativeFunctions.Add(nativeSetFunction); + }; + nativeFunctions.Add(nativeSetFunction); - JsValue setMethodValue = JsValue.CreateFunction(nativeSetFunction); - descriptorValue.SetProperty("set", setMethodValue, true); + JsValue setMethodValue = JsValue.CreateFunction(nativeSetFunction); + descriptorValue.SetProperty("set", setMethodValue, true); + } typeValue.DefineProperty(fieldName, descriptorValue); } @@ -622,13 +624,13 @@ private void ProjectProperties(EmbeddedItem externalItem) JsValue descriptorValue = JsValue.CreateObject(); descriptorValue.SetProperty("enumerable", JsValue.True, true); - if (property.GetGetMethod() != null) + if (property.CanRead) { JsNativeFunction nativeGetFunction = (callee, isConstructCall, args, argCount, callbackData) => { JsValue undefinedValue = JsValue.Undefined; - if (instance && obj == null) + if (instance && obj is null) { CreateAndSetTypeError(string.Format( Strings.Runtime_InvalidThisContextForHostObjectProperty, propertyName)); @@ -639,7 +641,7 @@ private void ProjectProperties(EmbeddedItem externalItem) try { - result = property.GetValue(obj, new object[0]); + result = property.GetValue(obj, []); } catch (Exception e) { @@ -647,7 +649,7 @@ private void ProjectProperties(EmbeddedItem externalItem) var wrapperException = exception as WrapperException; JsValue errorValue; - if (wrapperException != null) + if (wrapperException is not null) { errorValue = CreateErrorFromWrapperException(wrapperException); } @@ -677,13 +679,13 @@ private void ProjectProperties(EmbeddedItem externalItem) descriptorValue.SetProperty("get", getMethodValue, true); } - if (property.GetSetMethod() != null) + if (property.CanWrite) { JsNativeFunction nativeSetFunction = (callee, isConstructCall, args, argCount, callbackData) => { JsValue undefinedValue = JsValue.Undefined; - if (instance && obj == null) + if (instance && obj is null) { CreateAndSetTypeError(string.Format( Strings.Runtime_InvalidThisContextForHostObjectProperty, propertyName)); @@ -695,7 +697,7 @@ private void ProjectProperties(EmbeddedItem externalItem) try { - property.SetValue(obj, value, new object[0]); + property.SetValue(obj, value, []); } catch (Exception e) { @@ -703,7 +705,7 @@ private void ProjectProperties(EmbeddedItem externalItem) var wrapperException = exception as WrapperException; JsValue errorValue; - if (wrapperException != null) + if (wrapperException is not null) { errorValue = CreateErrorFromWrapperException(wrapperException); } @@ -757,7 +759,7 @@ private void ProjectMethods(EmbeddedItem externalItem) { JsValue undefinedValue = JsValue.Undefined; - if (instance && obj == null) + if (instance && obj is null) { CreateAndSetTypeError(string.Format( Strings.Runtime_InvalidThisContextForHostObjectMethod, methodName)); @@ -768,7 +770,7 @@ private void ProjectMethods(EmbeddedItem externalItem) var bestFitMethod = (MethodInfo)ReflectionHelpers.GetBestFitMethod( methodCandidates, processedArgs); - if (bestFitMethod == null) + if (bestFitMethod is null) { CreateAndSetReferenceError(string.Format( Strings.Runtime_SuitableMethodOfHostObjectNotFound, methodName)); @@ -789,7 +791,7 @@ private void ProjectMethods(EmbeddedItem externalItem) var wrapperException = exception as WrapperException; JsValue errorValue; - if (wrapperException != null) + if (wrapperException is not null) { errorValue = CreateErrorFromWrapperException(wrapperException); } @@ -839,7 +841,7 @@ private Dictionary> GetAvailableMethodGroups(MethodInfo int methodCount = methods.Length; if (methodCount == 0) { - return new Dictionary>(); + return []; } var availableMethodGroups = new Dictionary>(methodCount); @@ -861,7 +863,7 @@ private Dictionary> GetAvailableMethodGroups(MethodInfo } else { - methodGroup = new List { method }; + methodGroup = [method]; availableMethodGroups.Add(methodName, methodGroup); } } @@ -871,7 +873,7 @@ private Dictionary> GetAvailableMethodGroups(MethodInfo private object[] GetHostItemMemberArguments(JsValue[] args, int maxArgCount = -1) { - if (args == null) + if (args is null) { throw new ArgumentNullException(nameof(args)); } @@ -896,7 +898,7 @@ private object[] GetHostItemMemberArguments(JsValue[] args, int maxArgCount = -1 } else { - processedArgs = new object[0]; + processedArgs = []; } return processedArgs; @@ -950,10 +952,10 @@ private static Exception UnwrapException(Exception exception) Exception originalException = exception; var targetInvocationException = exception as TargetInvocationException; - if (targetInvocationException != null) + if (targetInvocationException is not null) { Exception innerException = targetInvocationException.InnerException; - if (innerException != null) + if (innerException is not null) { originalException = innerException; } @@ -965,7 +967,7 @@ private static Exception UnwrapException(Exception exception) private static JsValue CreateErrorFromWrapperException(WrapperException exception) { var originalException = exception.InnerException as JsException; - JsErrorCode errorCode = originalException != null ? + JsErrorCode errorCode = originalException is not null ? originalException.ErrorCode : JsErrorCode.NoError; string description = exception.Description; @@ -975,7 +977,7 @@ private static JsValue CreateErrorFromWrapperException(WrapperException exceptio JsValue metadataValue = JsValue.CreateObject(); var scriptException = exception as WrapperScriptException; - if (scriptException != null) + if (scriptException is not null) { string type = scriptException.Type; string documentName = scriptException.DocumentName; @@ -994,7 +996,7 @@ private static JsValue CreateErrorFromWrapperException(WrapperException exceptio innerErrorValue.SetProperty("name", JsValue.FromString(type), true); var runtimeException = scriptException as WrapperRuntimeException; - if (runtimeException != null) + if (runtimeException is not null) { var errorNumber = (int)errorCode; string callStack = runtimeException.CallStack; @@ -1039,7 +1041,7 @@ public void Dispose() if (_disposedFlag.Set()) { var lazyEmbeddedObjects = _lazyEmbeddedObjects; - if (lazyEmbeddedObjects != null) + if (lazyEmbeddedObjects is not null) { if (lazyEmbeddedObjects.Count > 0) { @@ -1062,7 +1064,7 @@ public void Dispose() _embeddedObjectFinalizeCallback = null; var lazyEmbeddedTypes = _lazyEmbeddedTypes; - if (lazyEmbeddedTypes != null) + if (lazyEmbeddedTypes is not null) { if (lazyEmbeddedTypes.Count > 0) { diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/ScriptDispatcher.cs b/src/JavaScriptEngineSwitcher.ChakraCore/ScriptDispatcher.cs index fc19a767..4189c376 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/ScriptDispatcher.cs +++ b/src/JavaScriptEngineSwitcher.ChakraCore/ScriptDispatcher.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Runtime.ExceptionServices; #endif using System.Threading; @@ -36,7 +36,7 @@ internal sealed class ScriptDispatcher : IDisposable /// /// Synchronizer of script task queue /// - private readonly object _taskQueueSynchronizer = new object(); + private readonly Lock _taskQueueSynchronizer = new Lock(); /// /// Flag that object is destroyed @@ -92,7 +92,7 @@ private void StartThread() if (_taskQueue.Count > 0) { task = _taskQueue.Dequeue(); - if (task == null) + if (task is null) { _taskQueue.Clear(); return; @@ -100,7 +100,7 @@ private void StartThread() } } - if (task != null) + if (task is not null) { task.Run(); } @@ -135,9 +135,9 @@ private void ExecuteTask(ScriptTask task) task.Wait(); Exception exception = task.Exception; - if (exception != null) + if (exception is not null) { -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER ExceptionDispatchInfo.Capture(exception).Throw(); #elif NET40 exception.PreserveStackTrace(); @@ -161,7 +161,7 @@ public T Invoke(Func func) { VerifyNotDisposed(); - if (func == null) + if (func is null) { throw new ArgumentNullException(nameof(func)); } @@ -187,7 +187,7 @@ public void Invoke(Action action) { VerifyNotDisposed(); - if (action == null) + if (action is null) { throw new ArgumentNullException(nameof(action)); } @@ -215,13 +215,13 @@ public void Dispose() { EnqueueTask(null); - if (_thread != null) + if (_thread is not null) { _thread.Join(); _thread = null; } - if (_waitHandle != null) + if (_waitHandle is not null) { _waitHandle.Dispose(); _waitHandle = null; @@ -296,7 +296,7 @@ public void Wait() /// public virtual void Dispose() { - if (_waitHandle != null) + if (_waitHandle is not null) { _waitHandle.Dispose(); _waitHandle = null; diff --git a/src/JavaScriptEngineSwitcher.ChakraCore/readme.txt b/src/JavaScriptEngineSwitcher.ChakraCore/readme.txt index e5ae81ab..25bfdbde 100644 --- a/src/JavaScriptEngineSwitcher.ChakraCore/readme.txt +++ b/src/JavaScriptEngineSwitcher.ChakraCore/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: ChakraCore v3.26.0 + README file for JS Engine Switcher: ChakraCore v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -31,7 +31,14 @@ ============= RELEASE NOTES ============= - ChakraCore was updated to version of April 21, 2024. + 1. ChakraCore was updated to version of February 19, 2026; + 2. The value of a read-only field in an embedded object or type can no longer be + changed; + 3. Performed a migration to the modern C# null/not-null checks; + 4. Added support for .NET 10; + 5. In the `lock` statements for .NET 10 target now uses a instances of the + `System.Threading.Lock` class; + 6. Reduced a memory allocation by using collection expressions. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.Core/Extensions/ExceptionExtensions.cs b/src/JavaScriptEngineSwitcher.Core/Extensions/ExceptionExtensions.cs index dd956c8f..fc39a666 100644 --- a/src/JavaScriptEngineSwitcher.Core/Extensions/ExceptionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Core/Extensions/ExceptionExtensions.cs @@ -15,7 +15,7 @@ public static class ExceptionExtensions /// The exception public static void PreserveStackTrace(this Exception source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } diff --git a/src/JavaScriptEngineSwitcher.Core/Extensions/StringExtensions.cs b/src/JavaScriptEngineSwitcher.Core/Extensions/StringExtensions.cs index 747d67c5..0daef659 100644 --- a/src/JavaScriptEngineSwitcher.Core/Extensions/StringExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Core/Extensions/StringExtensions.cs @@ -7,6 +7,12 @@ namespace JavaScriptEngineSwitcher.Core.Extensions /// public static class StringExtensions { + /// + /// Array of strings used to find the newline + /// + private static readonly string[] _newLineStrings = ["\r\n", "\r", "\n"]; + + /// /// Returns a value indicating whether the specified quoted string occurs within this string /// @@ -15,12 +21,12 @@ public static class StringExtensions /// true if the quoted value occurs within this string; otherwise, false public static bool ContainsQuotedValue(this string source, string value) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (value == null) + if (value is null) { throw new ArgumentNullException(nameof(value)); } @@ -39,12 +45,12 @@ public static bool ContainsQuotedValue(this string source, string value) /// the current string public static string TrimStart(this string source, string trimString) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (trimString == null) + if (trimString is null) { throw new ArgumentNullException(nameof(trimString)); } @@ -68,14 +74,35 @@ public static string TrimStart(this string source, string trimString) /// /// Instance of /// An array of lines + [Obsolete] public static string[] SplitToLines(this string source) { - if (source == null) + if (source is null) + { + throw new ArgumentNullException(nameof(source)); + } + + string[] result = source.Split(_newLineStrings, StringSplitOptions.None); + + return result; + } + + /// + /// Splits a string into lines + /// + /// Instance of + /// to omit empty array + /// elements from the array returned; or to include empty + /// array elements in the array returned + /// An array of lines + internal static string[] SplitToLines(this string source, StringSplitOptions options) + { + if (source is null) { throw new ArgumentNullException(nameof(source)); } - string[] result = source.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); + string[] result = source.Split(_newLineStrings, options); return result; } @@ -92,7 +119,7 @@ public static string[] SplitToLines(this string source) /// true if the character was received successfully; otherwise, false internal static bool TryGetChar(this string source, int index, out char result) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } diff --git a/src/JavaScriptEngineSwitcher.Core/Extensions/TypeExtensions.cs b/src/JavaScriptEngineSwitcher.Core/Extensions/TypeExtensions.cs index a7229171..48201800 100644 --- a/src/JavaScriptEngineSwitcher.Core/Extensions/TypeExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Core/Extensions/TypeExtensions.cs @@ -20,7 +20,7 @@ public static TypeCode GetTypeCode(this Type source) TypeCode typeCode; #if NETSTANDARD1_3 - if (source == null) + if (source is null) { typeCode = TypeCode.Empty; } diff --git a/src/JavaScriptEngineSwitcher.Core/Helpers/JsErrorHelpers.cs b/src/JavaScriptEngineSwitcher.Core/Helpers/JsErrorHelpers.cs index d7d7969a..35a67f9d 100644 --- a/src/JavaScriptEngineSwitcher.Core/Helpers/JsErrorHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Core/Helpers/JsErrorHelpers.cs @@ -9,6 +9,7 @@ using JavaScriptEngineSwitcher.Core.Extensions; using JavaScriptEngineSwitcher.Core.Resources; +using JavaScriptEngineSwitcher.Core.Utilities; namespace JavaScriptEngineSwitcher.Core.Helpers { @@ -39,6 +40,33 @@ public static class JsErrorHelpers @")" + @"(?: -> (?[^\n\r]+))?$"); + + /// + /// Gets a string representation of the script error location + /// + /// Error message with the script error location + /// Error message without the script error location + /// String representation of the script error location + public static string GetErrorLocationFromMessage(string message, string messageWithoutErrorLocation) + { + if (string.IsNullOrWhiteSpace(message)) + { + return string.Empty; + } + + if (string.IsNullOrWhiteSpace(messageWithoutErrorLocation)) + { + return message; + } + + string errorLocation = message + .TrimStart(messageWithoutErrorLocation) + .TrimStart(EnvironmentShortcuts.NewLineChars) + ; + + return errorLocation; + } + /// /// Parses a string representation of the script error location to produce an array of /// instances @@ -46,46 +74,73 @@ public static class JsErrorHelpers /// String representation of the script error location /// An array of instances public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) + { + return ParseErrorLocation(errorLocation, MapErrorLocationItem); + } + + /// + /// Parses a string representation of the script error location to produce an array of + /// instances + /// + /// String representation of the script error location + /// Error location item mapper + /// An array of instances + public static ErrorLocationItem[] ParseErrorLocation(string errorLocation, + Func itemMapper) { if (string.IsNullOrWhiteSpace(errorLocation)) { - return new ErrorLocationItem[0]; + return []; } - var errorLocationItems = new List(); - string[] lines = errorLocation.SplitToLines(); + if (itemMapper is null) + { + throw new ArgumentNullException(nameof(itemMapper)); + } + + string[] lines = errorLocation.SplitToLines(StringSplitOptions.RemoveEmptyEntries); int lineCount = lines.Length; + var errorLocationItems = new List(lineCount); - for (int lineIndex = 0; lineIndex < lineCount; lineIndex++) + foreach (string line in lines) { - string line = lines[lineIndex]; - Match lineMatch = _errorLocationLineRegex.Match(line); - - if (lineMatch.Success) + ErrorLocationItem errorLocationItem = itemMapper(line); + if (errorLocationItem is not null) { - GroupCollection lineGroups = lineMatch.Groups; - - var errorLocationItem = new ErrorLocationItem - { - FunctionName = lineGroups["functionName"].Value, - DocumentName = lineGroups["documentName"].Value, - LineNumber = int.Parse(lineGroups["lineNumber"].Value), - ColumnNumber = lineGroups["columnNumber"].Success ? - int.Parse(lineGroups["columnNumber"].Value) : 0, - SourceFragment = lineGroups["sourceFragment"].Value - }; errorLocationItems.Add(errorLocationItem); } else { Debug.WriteLine(string.Format(Strings.Runtime_InvalidErrorLocationLineFormat, line)); - return new ErrorLocationItem[0]; + return []; } } return errorLocationItems.ToArray(); } + private static ErrorLocationItem MapErrorLocationItem(string errorLocationLine) + { + ErrorLocationItem item = null; + Match lineMatch = _errorLocationLineRegex.Match(errorLocationLine); + + if (lineMatch.Success) + { + GroupCollection lineGroups = lineMatch.Groups; + item = new ErrorLocationItem + { + FunctionName = lineGroups["functionName"].Value, + DocumentName = lineGroups["documentName"].Value, + LineNumber = int.Parse(lineGroups["lineNumber"].Value), + ColumnNumber = lineGroups["columnNumber"].Success ? + int.Parse(lineGroups["columnNumber"].Value) : 0, + SourceFragment = lineGroups["sourceFragment"].Value + }; + } + + return item; + } + /// /// Produces a string representation of the script error location from array of /// instances @@ -96,7 +151,7 @@ public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) public static string StringifyErrorLocationItems(ErrorLocationItem[] errorLocationItems, bool omitSourceFragment = false) { - if (errorLocationItems == null) + if (errorLocationItems is null) { throw new ArgumentException(nameof(errorLocationItems)); } @@ -201,7 +256,7 @@ public static void WriteErrorLocationLine(StringBuilder buffer, string functionN public static string GenerateEngineLoadErrorMessage(string description, string engineName, bool quoteDescription = false) { - if (engineName == null) + if (engineName is null) { throw new ArgumentNullException(nameof(engineName)); } @@ -286,7 +341,7 @@ public static string GenerateScriptErrorMessage(string type, string description, private static string GenerateScriptErrorMessage(string type, string description, string documentName, int lineNumber, int columnNumber, string sourceFragment, string callStack) { - if (description == null) + if (description is null) { throw new ArgumentNullException(nameof(description)); } @@ -341,7 +396,7 @@ private static string GenerateScriptErrorMessage(string type, string description /// Detailed error message public static string GenerateErrorDetails(JsException jsException, bool omitMessage = false) { - if (jsException == null) + if (jsException is null) { throw new ArgumentNullException(nameof(jsException)); } @@ -351,12 +406,12 @@ public static string GenerateErrorDetails(JsException jsException, bool omitMess WriteCommonErrorDetails(detailsBuilder, jsException, omitMessage); var jsScriptException = jsException as JsScriptException; - if (jsScriptException != null) + if (jsScriptException is not null) { WriteScriptErrorDetails(detailsBuilder, jsScriptException); var jsRuntimeException = jsScriptException as JsRuntimeException; - if (jsRuntimeException != null) + if (jsRuntimeException is not null) { WriteRuntimeErrorDetails(detailsBuilder, jsRuntimeException); } @@ -379,7 +434,7 @@ public static string GenerateErrorDetails(JsException jsException, bool omitMess public static string GenerateErrorDetails(JsScriptException jsScriptException, bool omitMessage = false) { - if (jsScriptException == null) + if (jsScriptException is null) { throw new ArgumentNullException(nameof(jsScriptException)); } @@ -390,7 +445,7 @@ public static string GenerateErrorDetails(JsScriptException jsScriptException, WriteScriptErrorDetails(detailsBuilder, jsScriptException); var jsRuntimeException = jsScriptException as JsRuntimeException; - if (jsRuntimeException != null) + if (jsRuntimeException is not null) { WriteRuntimeErrorDetails(detailsBuilder, jsRuntimeException); } @@ -412,7 +467,7 @@ public static string GenerateErrorDetails(JsScriptException jsScriptException, public static string GenerateErrorDetails(JsRuntimeException jsRuntimeException, bool omitMessage = false) { - if (jsRuntimeException == null) + if (jsRuntimeException is null) { throw new ArgumentNullException(nameof(jsRuntimeException)); } diff --git a/src/JavaScriptEngineSwitcher.Core/Helpers/TextHelpers.cs b/src/JavaScriptEngineSwitcher.Core/Helpers/TextHelpers.cs index aaf9c423..759c90bf 100644 --- a/src/JavaScriptEngineSwitcher.Core/Helpers/TextHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Core/Helpers/TextHelpers.cs @@ -4,6 +4,7 @@ using AdvancedStringBuilder; using JavaScriptEngineSwitcher.Core.Extensions; +using JavaScriptEngineSwitcher.Core.Utilities; namespace JavaScriptEngineSwitcher.Core.Helpers { @@ -15,7 +16,7 @@ public static class TextHelpers /// /// Array of characters used to find the next line break /// - private static readonly char[] _nextLineBreakChars = new char[] { '\r', '\n' }; + private static readonly char[] _nextLineBreakChars = EnvironmentShortcuts.NewLineChars; /// diff --git a/src/JavaScriptEngineSwitcher.Core/Helpers/ValidationHelpers.cs b/src/JavaScriptEngineSwitcher.Core/Helpers/ValidationHelpers.cs index cadeb669..8e3cd858 100644 --- a/src/JavaScriptEngineSwitcher.Core/Helpers/ValidationHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Core/Helpers/ValidationHelpers.cs @@ -15,21 +15,21 @@ public static class ValidationHelpers /// List of supported types /// private static readonly Type[] _supportedTypes = - { + [ typeof(Undefined), typeof(Boolean), typeof(Int32), typeof(Double), typeof(String) - }; + ]; /// /// List of primitive type codes /// private static readonly TypeCode[] _primitiveTypeCodes = - { + [ TypeCode.Boolean, TypeCode.SByte, TypeCode.Byte, TypeCode.Int16, TypeCode.UInt16, TypeCode.Int32, TypeCode.UInt32, TypeCode.Int64, TypeCode.UInt64, TypeCode.Single, TypeCode.Double, TypeCode.Decimal, TypeCode.Char, TypeCode.String - }; + ]; /// /// Regular expression for working with JS names diff --git a/src/JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj b/src/JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj index 605f4b98..427e5f6e 100644 --- a/src/JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj +++ b/src/JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj @@ -2,12 +2,13 @@ JS Engine Switcher: Core - 3.24.1 - net40-client;net45;netstandard1.3;netstandard2.0 + 3.31.0 + net40-client;net45;netstandard1.3;netstandard2.0;net10.0 1.6.0 Library true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NETSDK1215;NU1903 + false true true @@ -22,10 +23,14 @@ ../../Icons/JavaScriptEngineSwitcher_Core_Logo128x128.png JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine. $(PackageCommonTags) + 1. Performed a migration to the modern C# null/not-null checks; +2. Added support for .NET 10; +3. In the `lock` statements for .NET 10 target now uses a instances of the `System.Threading.Lock` class; +4. Reduced a memory allocation by using collection expressions. - + diff --git a/src/JavaScriptEngineSwitcher.Core/JsCompilationException.cs b/src/JavaScriptEngineSwitcher.Core/JsCompilationException.cs index 728437e4..93e0d3ec 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsCompilationException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsCompilationException.cs @@ -72,6 +72,9 @@ public JsCompilationException(string message, string engineName, string engineVe /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsCompilationException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsEngineBase.cs b/src/JavaScriptEngineSwitcher.Core/JsEngineBase.cs index d2efe334..e3624c2a 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsEngineBase.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsEngineBase.cs @@ -142,7 +142,7 @@ public virtual IPrecompiledScript Precompile(string code) { VerifyNotDisposed(); - if (code == null) + if (code is null) { throw new ArgumentNullException( nameof(code), @@ -166,7 +166,7 @@ public virtual IPrecompiledScript Precompile(string code, string documentName) { VerifyNotDisposed(); - if (code == null) + if (code is null) { throw new ArgumentNullException( nameof(code), @@ -199,7 +199,7 @@ public virtual IPrecompiledScript PrecompileFile(string path, Encoding encoding { VerifyNotDisposed(); - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), @@ -240,7 +240,7 @@ public virtual IPrecompiledScript PrecompileResource(string resourceName, Type t { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -248,7 +248,7 @@ public virtual IPrecompiledScript PrecompileResource(string resourceName, Type t ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -278,7 +278,7 @@ public virtual IPrecompiledScript PrecompileResource(string resourceName, Type t Assembly assembly = type.GetTypeInfo().Assembly; #endif string nameSpace = type.Namespace; - string resourceFullName = nameSpace != null ? nameSpace + "." + resourceName : resourceName; + string resourceFullName = nameSpace is not null ? nameSpace + "." + resourceName : resourceName; string code = Utils.GetResourceAsString(resourceFullName, assembly); if (string.IsNullOrWhiteSpace(code)) @@ -297,7 +297,7 @@ public virtual IPrecompiledScript PrecompileResource(string resourceName, Assemb { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -305,7 +305,7 @@ public virtual IPrecompiledScript PrecompileResource(string resourceName, Assemb ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -346,7 +346,7 @@ public virtual object Evaluate(string expression) { VerifyNotDisposed(); - if (expression == null) + if (expression is null) { throw new ArgumentNullException( nameof(expression), @@ -370,7 +370,7 @@ public virtual object Evaluate(string expression, string documentName) { VerifyNotDisposed(); - if (expression == null) + if (expression is null) { throw new ArgumentNullException( nameof(expression), @@ -403,7 +403,7 @@ public virtual T Evaluate(string expression) { VerifyNotDisposed(); - if (expression == null) + if (expression is null) { throw new ArgumentNullException( nameof(expression), @@ -436,7 +436,7 @@ public virtual T Evaluate(string expression, string documentName) { VerifyNotDisposed(); - if (expression == null) + if (expression is null) { throw new ArgumentNullException( nameof(expression), @@ -478,7 +478,7 @@ public virtual void Execute(string code) { VerifyNotDisposed(); - if (code == null) + if (code is null) { throw new ArgumentNullException( nameof(code), @@ -502,7 +502,7 @@ public virtual void Execute(string code, string documentName) { VerifyNotDisposed(); - if (code == null) + if (code is null) { throw new ArgumentNullException( nameof(code), @@ -535,7 +535,7 @@ public virtual void Execute(IPrecompiledScript precompiledScript) { VerifyNotDisposed(); - if (precompiledScript == null) + if (precompiledScript is null) { throw new ArgumentNullException( nameof(precompiledScript), @@ -560,7 +560,7 @@ public virtual void ExecuteFile(string path, Encoding encoding = null) { VerifyNotDisposed(); - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), @@ -601,7 +601,7 @@ public virtual void ExecuteResource(string resourceName, Type type) { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -609,7 +609,7 @@ public virtual void ExecuteResource(string resourceName, Type type) ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -639,7 +639,7 @@ public virtual void ExecuteResource(string resourceName, Type type) Assembly assembly = type.GetTypeInfo().Assembly; #endif string nameSpace = type.Namespace; - string resourceFullName = nameSpace != null ? nameSpace + "." + resourceName : resourceName; + string resourceFullName = nameSpace is not null ? nameSpace + "." + resourceName : resourceName; string code = Utils.GetResourceAsString(resourceFullName, assembly); if (string.IsNullOrWhiteSpace(code)) @@ -658,7 +658,7 @@ public virtual void ExecuteResource(string resourceName, Assembly assembly) { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -666,7 +666,7 @@ public virtual void ExecuteResource(string resourceName, Assembly assembly) ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -707,7 +707,7 @@ public virtual object CallFunction(string functionName, params object[] args) { VerifyNotDisposed(); - if (functionName == null) + if (functionName is null) { throw new ArgumentNullException( nameof(functionName), @@ -738,7 +738,7 @@ public virtual object CallFunction(string functionName, params object[] args) { object argument = args[argumentIndex]; - if (argument != null) + if (argument is not null) { Type argType = argument.GetType(); @@ -762,7 +762,7 @@ public virtual T CallFunction(string functionName, params object[] args) { VerifyNotDisposed(); - if (functionName == null) + if (functionName is null) { throw new ArgumentNullException( nameof(functionName), @@ -793,7 +793,7 @@ public virtual T CallFunction(string functionName, params object[] args) { object argument = args[argumentIndex]; - if (argument != null) + if (argument is not null) { Type argType = argument.GetType(); @@ -826,7 +826,7 @@ public virtual bool HasVariable(string variableName) { VerifyNotDisposed(); - if (variableName == null) + if (variableName is null) { throw new ArgumentNullException( nameof(variableName), @@ -858,7 +858,7 @@ public virtual object GetVariableValue(string variableName) { VerifyNotDisposed(); - if (variableName == null) + if (variableName is null) { throw new ArgumentNullException( nameof(variableName), @@ -890,7 +890,7 @@ public virtual T GetVariableValue(string variableName) { VerifyNotDisposed(); - if (variableName == null) + if (variableName is null) { throw new ArgumentNullException( nameof(variableName), @@ -931,7 +931,7 @@ public virtual void SetVariableValue(string variableName, object value) { VerifyNotDisposed(); - if (variableName == null) + if (variableName is null) { throw new ArgumentNullException( nameof(variableName), @@ -955,7 +955,7 @@ public virtual void SetVariableValue(string variableName, object value) ); } - if (value != null) + if (value is not null) { Type variableType = value.GetType(); @@ -977,7 +977,7 @@ public virtual void RemoveVariable(string variableName) { VerifyNotDisposed(); - if (variableName == null) + if (variableName is null) { throw new ArgumentNullException( nameof(variableName), @@ -1009,7 +1009,7 @@ public virtual void EmbedHostObject(string itemName, object value) { VerifyNotDisposed(); - if (itemName == null) + if (itemName is null) { throw new ArgumentNullException( nameof(itemName), @@ -1017,7 +1017,7 @@ public virtual void EmbedHostObject(string itemName, object value) ); } - if (value == null) + if (value is null) { throw new ArgumentNullException( nameof(value), @@ -1061,7 +1061,7 @@ public virtual void EmbedHostType(string itemName, Type type) { VerifyNotDisposed(); - if (itemName == null) + if (itemName is null) { throw new ArgumentNullException( nameof(itemName), @@ -1069,7 +1069,7 @@ public virtual void EmbedHostType(string itemName, Type type) ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), diff --git a/src/JavaScriptEngineSwitcher.Core/JsEngineException.cs b/src/JavaScriptEngineSwitcher.Core/JsEngineException.cs index 9a97e59e..d55a6f36 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsEngineException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsEngineException.cs @@ -71,6 +71,9 @@ public JsEngineException(string message, string engineName, string engineVersion /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif protected JsEngineException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsEngineFactoryCollection.cs b/src/JavaScriptEngineSwitcher.Core/JsEngineFactoryCollection.cs index 632edba2..b2d254c0 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsEngineFactoryCollection.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsEngineFactoryCollection.cs @@ -55,7 +55,7 @@ public IJsEngineFactory Get(string engineName) /// The factory to add to the collection public void Add(IJsEngineFactory factory) { - if (factory == null) + if (factory is null) { throw new ArgumentNullException(nameof(factory)); } @@ -78,7 +78,7 @@ public void Add(IJsEngineFactory factory) /// A boolean value indicating whether the factory was succesfully removed from the collection public bool Remove(string engineName) { - if (engineName == null) + if (engineName is null) { throw new ArgumentNullException(nameof(engineName)); } @@ -93,7 +93,7 @@ public bool Remove(string engineName) /// A boolean value indicating whether the factory was succesfully removed from the collection public bool Remove(IJsEngineFactory factory) { - if (factory == null) + if (factory is null) { throw new ArgumentNullException(nameof(factory)); } diff --git a/src/JavaScriptEngineSwitcher.Core/JsEngineLoadException.cs b/src/JavaScriptEngineSwitcher.Core/JsEngineLoadException.cs index 9d84a9d0..fb921ed5 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsEngineLoadException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsEngineLoadException.cs @@ -71,6 +71,9 @@ public JsEngineLoadException(string message, string engineName, string engineVer /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsEngineLoadException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsEngineNotFoundException.cs b/src/JavaScriptEngineSwitcher.Core/JsEngineNotFoundException.cs index 7a9b37b4..4a125f19 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsEngineNotFoundException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsEngineNotFoundException.cs @@ -39,6 +39,9 @@ public JsEngineNotFoundException(string message, Exception innerException) /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsEngineNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsEngineSwitcher.cs b/src/JavaScriptEngineSwitcher.Core/JsEngineSwitcher.cs index 6ccf8d9f..327bccd4 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsEngineSwitcher.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsEngineSwitcher.cs @@ -122,7 +122,7 @@ public IJsEngine CreateEngine(string name) IJsEngine engine; IJsEngineFactory engineFactory = EngineFactories.Get(name); - if (engineFactory != null) + if (engineFactory is not null) { engine = engineFactory.CreateEngine(); } diff --git a/src/JavaScriptEngineSwitcher.Core/JsException.cs b/src/JavaScriptEngineSwitcher.Core/JsException.cs index 47ce344f..00c55465 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsException.cs @@ -2,8 +2,10 @@ using System.Text; #if !NETSTANDARD1_3 using System.Runtime.Serialization; +#if !NET10_0_OR_GREATER using System.Security.Permissions; #endif +#endif using AdvancedStringBuilder; @@ -125,10 +127,13 @@ public JsException(string message, string engineName, string engineVersion, Exce /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif protected JsException(SerializationInfo info, StreamingContext context) : base(info, context) { - if (info != null) + if (info is not null) { _engineName = info.GetString("EngineName"); _engineVersion = info.GetString("EngineVersion"); @@ -145,10 +150,14 @@ protected JsException(SerializationInfo info, StreamingContext context) /// /// The to populate with data /// The destination (see ) for this serialization +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#else [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info == null) + if (info is null) { throw new ArgumentNullException(nameof(info)); } @@ -186,13 +195,13 @@ public override string ToString() resultBuilder.Append(errorDetails); } - if (this.InnerException != null) + if (this.InnerException is not null) { resultBuilder.Append(" ---> "); resultBuilder.Append(this.InnerException.ToString()); } - if (this.StackTrace != null) + if (this.StackTrace is not null) { resultBuilder.AppendLine(); resultBuilder.AppendLine(this.StackTrace); diff --git a/src/JavaScriptEngineSwitcher.Core/JsFatalException.cs b/src/JavaScriptEngineSwitcher.Core/JsFatalException.cs index 36030448..eed8abd3 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsFatalException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsFatalException.cs @@ -71,6 +71,9 @@ public JsFatalException(string message, string engineName, string engineVersion, /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsFatalException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsInterruptedException.cs b/src/JavaScriptEngineSwitcher.Core/JsInterruptedException.cs index aa1e5b22..cb8095cb 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsInterruptedException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsInterruptedException.cs @@ -71,6 +71,9 @@ public JsInterruptedException(string message, string engineName, string engineVe /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsInterruptedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsRuntimeException.cs b/src/JavaScriptEngineSwitcher.Core/JsRuntimeException.cs index 0bad7ae9..c5983422 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsRuntimeException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsRuntimeException.cs @@ -1,8 +1,10 @@ using System; #if !NETSTANDARD1_3 using System.Runtime.Serialization; +#if !NET10_0_OR_GREATER using System.Security.Permissions; #endif +#endif using JavaScriptEngineSwitcher.Core.Constants; @@ -87,10 +89,13 @@ public JsRuntimeException(string message, string engineName, string engineVersio /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif protected JsRuntimeException(SerializationInfo info, StreamingContext context) : base(info, context) { - if (info != null) + if (info is not null) { _callStack = info.GetString("CallStack"); } @@ -104,10 +109,14 @@ protected JsRuntimeException(SerializationInfo info, StreamingContext context) /// /// The to populate with data /// The destination (see ) for this serialization +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#else [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info == null) + if (info is null) { throw new ArgumentNullException(nameof(info)); } diff --git a/src/JavaScriptEngineSwitcher.Core/JsScriptException.cs b/src/JavaScriptEngineSwitcher.Core/JsScriptException.cs index d76bd655..3790554e 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsScriptException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsScriptException.cs @@ -1,8 +1,10 @@ using System; #if !NETSTANDARD1_3 using System.Runtime.Serialization; +#if !NET10_0_OR_GREATER using System.Security.Permissions; #endif +#endif namespace JavaScriptEngineSwitcher.Core { @@ -133,10 +135,13 @@ public JsScriptException(string message, string engineName, string engineVersion /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif protected JsScriptException(SerializationInfo info, StreamingContext context) : base(info, context) { - if (info != null) + if (info is not null) { _type = info.GetString("Type"); _documentName = info.GetString("DocumentName"); @@ -154,10 +159,14 @@ protected JsScriptException(SerializationInfo info, StreamingContext context) /// /// The to populate with data /// The destination (see ) for this serialization +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#else [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info == null) + if (info is null) { throw new ArgumentNullException(nameof(info)); } diff --git a/src/JavaScriptEngineSwitcher.Core/JsTimeoutException.cs b/src/JavaScriptEngineSwitcher.Core/JsTimeoutException.cs index fd016688..1562b2e5 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsTimeoutException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsTimeoutException.cs @@ -71,6 +71,9 @@ public JsTimeoutException(string message, string engineName, string engineVersio /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsTimeoutException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/JsUsageException.cs b/src/JavaScriptEngineSwitcher.Core/JsUsageException.cs index 2bc7eb84..616b8dc6 100644 --- a/src/JavaScriptEngineSwitcher.Core/JsUsageException.cs +++ b/src/JavaScriptEngineSwitcher.Core/JsUsageException.cs @@ -71,6 +71,9 @@ public JsUsageException(string message, string engineName, string engineVersion, /// /// The object that holds the serialized data /// The contextual information about the source or destination +#if NET10_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif private JsUsageException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/JavaScriptEngineSwitcher.Core/Polyfills/System/Reflection/TypeInfoExtensions.cs b/src/JavaScriptEngineSwitcher.Core/Polyfills/System/Reflection/TypeInfoExtensions.cs index d74b00b7..84b497a1 100644 --- a/src/JavaScriptEngineSwitcher.Core/Polyfills/System/Reflection/TypeInfoExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Core/Polyfills/System/Reflection/TypeInfoExtensions.cs @@ -8,12 +8,12 @@ internal static class TypeInfoExtensions { public static bool IsInstanceOfType(this TypeInfo source, object o) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (o == null) + if (o is null) { return false; } diff --git a/src/JavaScriptEngineSwitcher.Core/Utilities/EnvironmentShortcuts.cs b/src/JavaScriptEngineSwitcher.Core/Utilities/EnvironmentShortcuts.cs new file mode 100644 index 00000000..948721ca --- /dev/null +++ b/src/JavaScriptEngineSwitcher.Core/Utilities/EnvironmentShortcuts.cs @@ -0,0 +1,15 @@ +using System; + +namespace JavaScriptEngineSwitcher.Core.Utilities +{ + /// + /// Shortcuts for accessing to values that depend on the current environment and platform + /// + internal static class EnvironmentShortcuts + { + /// + /// Gets a array of the newline characters + /// + internal static readonly char[] NewLineChars = Environment.NewLine == "\r\n" ? ['\r', '\n'] : ['\n', '\r']; + } +} \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.Core/Utilities/TypeConverter.cs b/src/JavaScriptEngineSwitcher.Core/Utilities/TypeConverter.cs index fcd47cd4..8e3de440 100644 --- a/src/JavaScriptEngineSwitcher.Core/Utilities/TypeConverter.cs +++ b/src/JavaScriptEngineSwitcher.Core/Utilities/TypeConverter.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; using System.Globalization; -#if NET45 || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Reflection; #endif using OriginalTypeConverter = System.ComponentModel.TypeConverter; @@ -79,7 +79,7 @@ public static bool TryConvertToType(object value, Type targetType, out object co private static bool ConvertObjectToType(object obj, Type type, bool throwOnError, out object convertedObject) { - if (obj == null) + if (obj is null) { if (IsNonNullableValueType(type)) { @@ -96,7 +96,7 @@ private static bool ConvertObjectToType(object obj, Type type, bool throwOnError return true; } - if (type != null && obj.GetType() != type) + if (type is not null && obj.GetType() != type) { return InnerConvertObjectToType(obj, type, throwOnError, out convertedObject); } @@ -174,7 +174,7 @@ private static bool InnerConvertObjectToType(object obj, Type type, bool throwOn private static bool IsNonNullableValueType(Type type) { - if (type == null) + if (type is null) { return false; } diff --git a/src/JavaScriptEngineSwitcher.Core/Utilities/UniqueDocumentNameManager.cs b/src/JavaScriptEngineSwitcher.Core/Utilities/UniqueDocumentNameManager.cs index 248d7d00..b9522012 100644 --- a/src/JavaScriptEngineSwitcher.Core/Utilities/UniqueDocumentNameManager.cs +++ b/src/JavaScriptEngineSwitcher.Core/Utilities/UniqueDocumentNameManager.cs @@ -1,6 +1,11 @@ using System; using System.Collections.Generic; using System.IO; +#if NET10_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif using JavaScriptEngineSwitcher.Core.Resources; @@ -24,7 +29,7 @@ public sealed class UniqueDocumentNameManager /// /// Synchronizer of unique name storage /// - private readonly object _storageSynchronizer = new object(); + private readonly Lock _storageSynchronizer = new Lock(); /// @@ -33,7 +38,7 @@ public sealed class UniqueDocumentNameManager /// Default document name public UniqueDocumentNameManager(string defaultName) { - if (defaultName == null) + if (defaultName is null) { throw new ArgumentNullException( nameof(defaultName), diff --git a/src/JavaScriptEngineSwitcher.Core/Utilities/Utils.cs b/src/JavaScriptEngineSwitcher.Core/Utilities/Utils.cs index f26cd11b..5a237f34 100644 --- a/src/JavaScriptEngineSwitcher.Core/Utilities/Utils.cs +++ b/src/JavaScriptEngineSwitcher.Core/Utilities/Utils.cs @@ -24,7 +24,7 @@ public static class Utils /// static Utils() { - _isMonoRuntime = Type.GetType("Mono.Runtime") != null; + _isMonoRuntime = Type.GetType("Mono.Runtime") is not null; } @@ -62,7 +62,7 @@ public static bool Is64BitProcess() /// Content of the embedded resource as string public static string GetResourceAsString(string resourceName, Type type) { - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -70,7 +70,7 @@ public static string GetResourceAsString(string resourceName, Type type) ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -92,7 +92,7 @@ public static string GetResourceAsString(string resourceName, Type type) Assembly assembly = type.GetTypeInfo().Assembly; #endif string nameSpace = type.Namespace; - string resourceFullName = nameSpace != null ? nameSpace + "." + resourceName : resourceName; + string resourceFullName = nameSpace is not null ? nameSpace + "." + resourceName : resourceName; return InnerGetResourceAsString(resourceFullName, assembly); } @@ -105,7 +105,7 @@ public static string GetResourceAsString(string resourceName, Type type) /// Content of the embedded resource as string public static string GetResourceAsString(string resourceName, Assembly assembly) { - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -113,7 +113,7 @@ public static string GetResourceAsString(string resourceName, Assembly assembly) ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -136,7 +136,7 @@ private static string InnerGetResourceAsString(string resourceName, Assembly ass { using (Stream stream = assembly.GetManifestResourceStream(resourceName)) { - if (stream == null) + if (stream is null) { throw new NullReferenceException( string.Format(Strings.Common_ResourceIsNull, resourceName) diff --git a/src/JavaScriptEngineSwitcher.Core/readme.txt b/src/JavaScriptEngineSwitcher.Core/readme.txt index cf5e35d8..accc4bc8 100644 --- a/src/JavaScriptEngineSwitcher.Core/readme.txt +++ b/src/JavaScriptEngineSwitcher.Core/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: Core v3.24.1 + README file for JS Engine Switcher: Core v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -17,6 +17,15 @@ ClearScript.V8, VroomJs and YantraJS). This library allows you to quickly and easily switch to using of another JavaScript engine. + ============= + RELEASE NOTES + ============= + 1. Performed a migration to the modern C# null/not-null checks; + 2. Added support for .NET 10; + 3. In the `lock` statements for .NET 10 target now uses a instances of the + `System.Threading.Lock` class; + 4. Reduced a memory allocation by using collection expressions. + ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection.csproj b/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection.csproj index c8116032..7356cd59 100644 --- a/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection.csproj +++ b/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection.csproj @@ -2,12 +2,13 @@ JS Engine Switcher: MS Dependency Injection - 3.24.1 - net45;netstandard1.3;netstandard2.0 + 3.31.0 + net45;netstandard1.3;netstandard2.0;net10.0 1.6.0 Library true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NETSDK1215;NU1903 + false true @@ -20,6 +21,8 @@ ../../Icons/JavaScriptEngineSwitcher_Extensions_MsDependencyInjection_Logo128x128.png JavaScriptEngineSwitcher.Extensions.MsDependencyInjection contains extension methods for adding the JS engine switcher in an `IServiceCollection`. $(PackageCommonTags);DI + 1. Performed a migration to the modern C# null/not-null checks; +2. Added support for .NET 10. @@ -34,4 +37,8 @@ + + + + \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JsEngineSwitcherServiceCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JsEngineSwitcherServiceCollectionExtensions.cs index 624b2f76..0773eaa1 100644 --- a/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JsEngineSwitcherServiceCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/JsEngineSwitcherServiceCollectionExtensions.cs @@ -18,7 +18,7 @@ public static class JsEngineSwitcherServiceCollectionExtensions /// Instance of the public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollection services) { - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } @@ -41,12 +41,12 @@ public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollect public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollection services, IJsEngineSwitcher engineSwitcher) { - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (engineSwitcher == null) + if (engineSwitcher is null) { throw new ArgumentNullException(nameof(engineSwitcher)); } @@ -69,12 +69,12 @@ public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollect public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollection services, Action configure) { - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -99,17 +99,17 @@ public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollect public static JsEngineFactoryCollection AddJsEngineSwitcher(this IServiceCollection services, IJsEngineSwitcher engineSwitcher, Action configure) { - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (engineSwitcher == null) + if (engineSwitcher is null) { throw new ArgumentNullException(nameof(engineSwitcher)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } diff --git a/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/readme.txt b/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/readme.txt index a4b6267d..d2c1a059 100644 --- a/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/readme.txt +++ b/src/JavaScriptEngineSwitcher.Extensions.MsDependencyInjection/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: MS Dependency Injection v3.24.1 + README file for JS Engine Switcher: MS Dependency Injection v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -14,6 +14,12 @@ JavaScriptEngineSwitcher.Extensions.MsDependencyInjection contains extension methods for adding the JS engine switcher in an `IServiceCollection`. + ============= + RELEASE NOTES + ============= + 1. Performed a migration to the modern C# null/not-null checks; + 2. Added support for .NET 10. + ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.Jint/CustomTypeResolvers.cs b/src/JavaScriptEngineSwitcher.Jint/CustomTypeResolvers.cs index 4e1dfd8a..835e5082 100644 --- a/src/JavaScriptEngineSwitcher.Jint/CustomTypeResolvers.cs +++ b/src/JavaScriptEngineSwitcher.Jint/CustomTypeResolvers.cs @@ -14,16 +14,16 @@ namespace JavaScriptEngineSwitcher.Jint internal static class CustomTypeResolvers { private static readonly PropertyInfo[] _disallowedProperties = - { + [ typeof(Delegate).GetProperty("Method"), typeof(Exception).GetProperty("TargetSite") - }; + ]; private static readonly MethodInfo[] _disallowedMethods = - { + [ typeof(object).GetMethod("GetType"), typeof(Exception).GetMethod("GetType") - }; + ]; private static readonly Lazy _allowingReflection = new Lazy( () => new OriginalTypeResolver() { MemberFilter = _ => true }); @@ -89,11 +89,11 @@ private MemberComparer() public override bool Equals(T x, T y) { - if (x == null && y == null) + if (x is null && y is null) { return true; } - else if (x == null || y == null) + else if (x is null || y is null) { return false; } @@ -103,7 +103,7 @@ public override bool Equals(T x, T y) public override int GetHashCode(T obj) { - return obj != null ? obj.GetHashCode() : 0; + return obj is not null ? obj.GetHashCode() : 0; } #endregion diff --git a/src/JavaScriptEngineSwitcher.Jint/Helpers/JintJsErrorHelpers.cs b/src/JavaScriptEngineSwitcher.Jint/Helpers/JintJsErrorHelpers.cs index 8e30d877..730fc53e 100644 --- a/src/JavaScriptEngineSwitcher.Jint/Helpers/JintJsErrorHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Jint/Helpers/JintJsErrorHelpers.cs @@ -1,16 +1,11 @@ using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Text; using System.Text.RegularExpressions; using AdvancedStringBuilder; -using JavaScriptEngineSwitcher.Core.Extensions; using JavaScriptEngineSwitcher.Core.Helpers; -using CoreStrings = JavaScriptEngineSwitcher.Core.Resources.Strings; - namespace JavaScriptEngineSwitcher.Jint.Helpers { /// @@ -24,27 +19,50 @@ internal static class JintJsErrorHelpers private const string WrapperAnonymousFunctionName = "Anonymous function"; private const string DelegateFunctionName = "delegate"; + /// + /// Pattern for working with document names with coordinates + /// + private static readonly string DocumentNameWithCoordinatesPattern = + @"(?" + CommonRegExps.DocumentNamePattern + @"):" + + @"(?\d+)(?::(?\d+))?"; + /// /// Regular expression for working with line of the script error location /// private static readonly Regex _errorLocationLineRegex = - new Regex(@"^[ ]{3}at " + + new Regex(@"^[ ]{4}at " + @"(?:" + - @"(?:" + - @"(?" + - @"[\w][\w ]*" + - @"|" + - CommonRegExps.JsFullNamePattern + - @"|" + - Regex.Escape(OriginalAnonymousFunctionName) + - @") " + - @"\((?:" + CommonRegExps.JsFullNamePattern + @"(?:, " + CommonRegExps.JsFullNamePattern + @")*)?\)" + + @"(?" + + @"[\w][\w ]*" + + @"|" + + CommonRegExps.JsFullNamePattern + @"|" + - @"(?" + Regex.Escape(DelegateFunctionName) + @")" + + Regex.Escape(OriginalAnonymousFunctionName) + @") " + - @")?" + - @"(?" + CommonRegExps.DocumentNamePattern + @"):" + - @"(?\d+)(?::(?\d+))?$"); + @"\(" + DocumentNameWithCoordinatesPattern + @"\)" + + @"|" + + DocumentNameWithCoordinatesPattern + + @")" + + "$"); + + /// + /// Regular expression for working with the syntax error message + /// + private static readonly Regex _syntaxErrorMessageRegex = + new Regex(@"^(?[\s\S]+?) \(" + CommonRegExps.DocumentNamePattern + @":\d+:\d+\)$"); + + /// + /// Regular expression for working with the script preparation error message + /// + private static readonly Regex _scriptPreparationErrorMessageRegex = + new Regex(@"^Could not prepare script: (?[\s\S]+?) " + + @"\((?" + CommonRegExps.DocumentNamePattern + @"):" + + @"(?\d+):(?\d+)\)$"); + + /// + /// Call chain separator + /// + private static readonly string[] _callChainSeparator = ["->"]; /// @@ -55,42 +73,28 @@ internal static class JintJsErrorHelpers /// An array of instances public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) { - if (string.IsNullOrWhiteSpace(errorLocation)) - { - return new ErrorLocationItem[0]; - } + return JsErrorHelpers.ParseErrorLocation(errorLocation, MapErrorLocationItem); + } - var errorLocationItems = new List(); - string[] lines = errorLocation.SplitToLines(); - int lineCount = lines.Length; + private static ErrorLocationItem MapErrorLocationItem(string errorLocationLine) + { + ErrorLocationItem item = null; + Match lineMatch = _errorLocationLineRegex.Match(errorLocationLine); - for (int lineIndex = 0; lineIndex < lineCount; lineIndex++) + if (lineMatch.Success) { - string line = lines[lineIndex]; - Match lineMatch = _errorLocationLineRegex.Match(line); - - if (lineMatch.Success) - { - GroupCollection lineGroups = lineMatch.Groups; - - var errorLocationItem = new ErrorLocationItem - { - FunctionName = lineGroups["functionName"].Value, - DocumentName = lineGroups["documentName"].Value, - LineNumber = int.Parse(lineGroups["lineNumber"].Value), - ColumnNumber = lineGroups["columnNumber"].Success ? - int.Parse(lineGroups["columnNumber"].Value) : 0 - }; - errorLocationItems.Add(errorLocationItem); - } - else + GroupCollection lineGroups = lineMatch.Groups; + item = new ErrorLocationItem { - Debug.WriteLine(string.Format(CoreStrings.Runtime_InvalidErrorLocationLineFormat, line)); - return new ErrorLocationItem[0]; - } + FunctionName = lineGroups["functionName"].Value, + DocumentName = lineGroups["documentName"].Value, + LineNumber = int.Parse(lineGroups["lineNumber"].Value), + ColumnNumber = lineGroups["columnNumber"].Success ? + int.Parse(lineGroups["columnNumber"].Value) : 0 + }; } - return errorLocationItems.ToArray(); + return item; } /// @@ -122,7 +126,7 @@ public static string ConvertCallChainToStack(string callChain) { string callStack = string.Empty; string[] callChainItems = callChain - .Split(new string[] { "->" }, StringSplitOptions.None) + .Split(_callChainSeparator, StringSplitOptions.None) ; if (callChainItems.Length > 0) @@ -152,6 +156,50 @@ public static string ConvertCallChainToStack(string callChain) return callStack; } + /// + /// Gets a description from the syntax error message + /// + /// Error message + /// Description of error + public static string GetDescriptionFromSyntaxErrorMessage(string message) + { + Match messageMatch = _syntaxErrorMessageRegex.Match(message); + string description = messageMatch.Success ? + messageMatch.Groups["description"].Value : message; + + return description; + } + + /// + /// Parses a script preparation error message + /// + /// Error message + /// Description of error + /// Script error location + public static void ParseScriptPreparationErrorMessage(string message, out string description, + out ErrorLocationItem errorLocation) + { + Match messageMatch = _scriptPreparationErrorMessageRegex.Match(message); + + if (messageMatch.Success) + { + GroupCollection messageGroups = messageMatch.Groups; + + description = messageGroups["description"].Value; + errorLocation = new ErrorLocationItem + { + DocumentName = messageGroups["documentName"].Value, + LineNumber = int.Parse(messageGroups["lineNumber"].Value), + ColumnNumber = int.Parse(messageGroups["columnNumber"].Value) + }; + } + else + { + description = message; + errorLocation = new ErrorLocationItem(); + } + } + #endregion } } \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj b/src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj index 56d501eb..fc09fada 100644 --- a/src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj +++ b/src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj @@ -2,11 +2,12 @@ JS Engine Switcher: Jint - 3.25.0 - net462;netstandard2.0;netstandard2.1;net6.0;net8.0 + 3.33.1 + net462;netstandard2.0;netstandard2.1;net8.0;net10.0 Library true $(NoWarn);CS1591;NU5104 + false true true @@ -21,11 +22,11 @@ ../../Icons/JavaScriptEngineSwitcher_Jint_Logo128x128.png JavaScriptEngineSwitcher.Jint contains a `JintJsEngine` adapter (wrapper for the Jint). $(PackageCommonTags);Jint - Jint was updated to version 3.1.1. + Jint was updated to version 4.6.3. - + diff --git a/src/JavaScriptEngineSwitcher.Jint/JintJsEngine.cs b/src/JavaScriptEngineSwitcher.Jint/JintJsEngine.cs index 1108f86c..a9f97a45 100644 --- a/src/JavaScriptEngineSwitcher.Jint/JintJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.Jint/JintJsEngine.cs @@ -1,5 +1,10 @@ using System; using System.Threading; +#if NET10_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif using Jint; using IOriginalPrimitive = Jint.Native.IJsPrimitive; @@ -7,15 +12,15 @@ using OriginalDebuggerEventHandler = Jint.Runtime.Debugger.DebugHandler.DebugEventHandler; using OriginalDebuggerStatementHandlingMode = Jint.Runtime.Debugger.DebuggerStatementHandling; using OriginalEngine = Jint.Engine; -using OriginalErrorPosition = Esprima.Position; +using OriginalErrorPosition = Acornima.Position; using OriginalExecutionCanceledException = Jint.Runtime.ExecutionCanceledException; +using OriginalException = Jint.JintException; using OriginalJavaScriptException = Jint.Runtime.JavaScriptException; using OriginalMemoryLimitExceededException = Jint.Runtime.MemoryLimitExceededException; using OriginalObjectInstance = Jint.Native.Object.ObjectInstance; -using OriginalParsedScript = Jint.Prepared; -using OriginalParserException = Esprima.ParserException; +using OriginalParsedScript = Jint.Prepared; using OriginalRecursionDepthOverflowException = Jint.Runtime.RecursionDepthOverflowException; -using OriginalRuntimeException = Jint.Runtime.JintException; +using OriginalScriptPreparationException = Jint.ScriptPreparationException; using OriginalStatementsCountOverflowException = Jint.Runtime.StatementsCountOverflowException; using OriginalTypeReference = Jint.Runtime.Interop.TypeReference; using OriginalTypes = Jint.Runtime.Types; @@ -30,6 +35,7 @@ using WrapperCompilationException = JavaScriptEngineSwitcher.Core.JsCompilationException; using WrapperInterruptedException = JavaScriptEngineSwitcher.Core.JsInterruptedException; using WrapperRuntimeException = JavaScriptEngineSwitcher.Core.JsRuntimeException; +using WrapperScriptException = JavaScriptEngineSwitcher.Core.JsScriptException; using WrapperTimeoutException = JavaScriptEngineSwitcher.Core.JsTimeoutException; using WrapperUsageException = JavaScriptEngineSwitcher.Core.JsUsageException; @@ -50,7 +56,7 @@ public sealed class JintJsEngine : JsEngineBase /// /// Version of original JS engine /// - private const string EngineVersion = "3.1.1"; + private const string EngineVersion = "4.6.3"; /// /// Jint JS engine @@ -85,7 +91,7 @@ public sealed class JintJsEngine : JsEngineBase /// /// Synchronizer of script execution /// - private readonly object _executionSynchronizer = new object(); + private readonly Lock _executionSynchronizer = new Lock(); /// /// Unique document name manager @@ -146,11 +152,11 @@ public JintJsEngine(JintSettings settings) CustomTypeResolvers.AllowingReflection : CustomTypeResolvers.DisallowingReflection); }); _cancellationConstraint = _jsEngine.Constraints.Find(); - if (_debuggerBreakCallback != null) + if (_debuggerBreakCallback is not null) { _jsEngine.Debugger.Break += _debuggerBreakCallback; } - if (_debuggerStepCallback != null) + if (_debuggerStepCallback is not null) { _jsEngine.Debugger.Step += _debuggerStepCallback; } @@ -201,33 +207,10 @@ private object MapToHostType(OriginalValue value) return value.ToObject(); } - private static WrapperCompilationException WrapParserException(OriginalParserException originalParserException) + private WrapperScriptException WrapException(OriginalException originalException) { - string description = originalParserException.Description; - string type = JsErrorType.Syntax; - string documentName = originalParserException.SourceLocation ?? string.Empty; - int lineNumber = originalParserException.LineNumber; - int columnNumber = originalParserException.Column; - string message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, documentName, lineNumber, - columnNumber); - - var wrapperCompilationException = new WrapperCompilationException(message, EngineName, EngineVersion, - originalParserException) - { - Description = description, - Type = type, - DocumentName = documentName, - LineNumber = lineNumber, - ColumnNumber = columnNumber - }; - - return wrapperCompilationException; - } - - private WrapperRuntimeException WrapRuntimeException(OriginalRuntimeException originalRuntimeException) - { - WrapperRuntimeException wrapperRuntimeException; - string message = originalRuntimeException.Message; + WrapperScriptException wrapperScriptException; + string message = originalException.Message; if (string.IsNullOrWhiteSpace(message)) { message = "An unknown error occurred"; @@ -239,10 +222,10 @@ private WrapperRuntimeException WrapRuntimeException(OriginalRuntimeException or int columnNumber = 0; string callStack = string.Empty; - if (originalRuntimeException is OriginalJavaScriptException) + if (originalException is OriginalJavaScriptException) { - var originalJavaScriptException = (OriginalJavaScriptException)originalRuntimeException; - documentName = originalJavaScriptException.Location.Source; + var originalJavaScriptException = (OriginalJavaScriptException)originalException; + documentName = originalJavaScriptException.Location.SourceFile; OriginalErrorPosition errorPosition = originalJavaScriptException.Location.Start; lineNumber = errorPosition.Line; columnNumber = errorPosition.Column + 1; @@ -272,38 +255,68 @@ private WrapperRuntimeException WrapRuntimeException(OriginalRuntimeException or type = JsErrorType.Common; } - message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, callStack); - - wrapperRuntimeException = new WrapperRuntimeException(message, EngineName, EngineVersion, - originalJavaScriptException); + if (type == JsErrorType.Syntax) + { + description = JintJsErrorHelpers.GetDescriptionFromSyntaxErrorMessage(message); + message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, documentName, lineNumber, + columnNumber); + wrapperScriptException = new WrapperCompilationException(message, EngineName, EngineVersion, + originalJavaScriptException); + } + else + { + message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, callStack); + wrapperScriptException = new WrapperRuntimeException(message, EngineName, EngineVersion, + originalJavaScriptException) + { + CallStack = callStack + }; + } + } + else if (originalException is OriginalScriptPreparationException) + { + ErrorLocationItem errorLocation; + JintJsErrorHelpers.ParseScriptPreparationErrorMessage(message, out description, out errorLocation); + + type = JsErrorType.Syntax; + documentName = errorLocation.DocumentName; + lineNumber = errorLocation.LineNumber; + columnNumber = errorLocation.ColumnNumber; + message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, documentName, lineNumber, + columnNumber); + wrapperScriptException = new WrapperCompilationException(message, EngineName, EngineVersion, + originalException); } - else if (originalRuntimeException is OriginalMemoryLimitExceededException) + else if (originalException is OriginalMemoryLimitExceededException) { type = JsErrorType.Common; message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, string.Empty); - wrapperRuntimeException = new WrapperRuntimeException(message, EngineName, EngineVersion, - originalRuntimeException); + wrapperScriptException = new WrapperRuntimeException(message, EngineName, EngineVersion, + originalException); } - else if (originalRuntimeException is OriginalRecursionDepthOverflowException) + else if (originalException is OriginalRecursionDepthOverflowException) { - var originalRecursionException = (OriginalRecursionDepthOverflowException)originalRuntimeException; + var originalRecursionException = (OriginalRecursionDepthOverflowException)originalException; callStack = JintJsErrorHelpers.ConvertCallChainToStack(originalRecursionException.CallChain); type = JsErrorType.Range; message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, callStack); - wrapperRuntimeException = new WrapperRuntimeException(message, EngineName, EngineVersion, - originalRecursionException); + wrapperScriptException = new WrapperRuntimeException(message, EngineName, EngineVersion, + originalRecursionException) + { + CallStack = callStack + }; } - else if (originalRuntimeException is OriginalStatementsCountOverflowException) + else if (originalException is OriginalStatementsCountOverflowException) { type = JsErrorType.Range; message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, string.Empty); - wrapperRuntimeException = new WrapperRuntimeException(message, EngineName, EngineVersion, - originalRuntimeException); + wrapperScriptException = new WrapperRuntimeException(message, EngineName, EngineVersion, + originalException); } - else if (originalRuntimeException is OriginalExecutionCanceledException) + else if (originalException is OriginalExecutionCanceledException) { _cancellationTokenSource.Dispose(); _cancellationTokenSource = new CancellationTokenSource(); @@ -314,26 +327,25 @@ private WrapperRuntimeException WrapRuntimeException(OriginalRuntimeException or message = CoreStrings.Runtime_ScriptInterrupted; description = message; - wrapperRuntimeException = new WrapperInterruptedException(message, - EngineName, EngineVersion, originalRuntimeException); + wrapperScriptException = new WrapperInterruptedException(message, + EngineName, EngineVersion, originalException); } else { type = JsErrorType.Common; message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, string.Empty); - wrapperRuntimeException = new WrapperRuntimeException(message, EngineName, EngineVersion, - originalRuntimeException); + wrapperScriptException = new WrapperRuntimeException(message, EngineName, EngineVersion, + originalException); } - wrapperRuntimeException.Description = description; - wrapperRuntimeException.Type = type; - wrapperRuntimeException.DocumentName = documentName; - wrapperRuntimeException.LineNumber = lineNumber; - wrapperRuntimeException.ColumnNumber = columnNumber; - wrapperRuntimeException.CallStack = callStack; + wrapperScriptException.Description = description; + wrapperScriptException.Type = type; + wrapperScriptException.DocumentName = documentName; + wrapperScriptException.LineNumber = lineNumber; + wrapperScriptException.ColumnNumber = columnNumber; - return wrapperRuntimeException; + return wrapperScriptException; } private static WrapperTimeoutException WrapTimeoutException(TimeoutException originalTimeoutException) @@ -368,9 +380,9 @@ protected override IPrecompiledScript InnerPrecompile(string code, string docume { parsedScript = OriginalEngine.PrepareScript(code, uniqueDocumentName, _strictMode); } - catch (OriginalParserException e) + catch (OriginalException e) { - throw WrapParserException(e); + throw WrapException(e); } return new JintPrecompiledScript(parsedScript); @@ -394,13 +406,9 @@ protected override object InnerEvaluate(string expression, string documentName) { resultValue = _jsEngine.Evaluate(expression, uniqueDocumentName); } - catch (OriginalParserException e) - { - throw WrapParserException(e); - } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } catch (TimeoutException e) { @@ -440,13 +448,9 @@ protected override void InnerExecute(string code, string documentName) { _jsEngine.Execute(code, uniqueDocumentName); } - catch (OriginalParserException e) - { - throw WrapParserException(e); - } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } catch (TimeoutException e) { @@ -458,7 +462,7 @@ protected override void InnerExecute(string code, string documentName) protected override void InnerExecute(IPrecompiledScript precompiledScript) { var jintPrecompiledScript = precompiledScript as JintPrecompiledScript; - if (jintPrecompiledScript == null) + if (jintPrecompiledScript is null) { throw new WrapperUsageException( string.Format(CoreStrings.Usage_CannotConvertPrecompiledScriptToInternalType, @@ -473,9 +477,9 @@ protected override void InnerExecute(IPrecompiledScript precompiledScript) { _jsEngine.Execute(jintPrecompiledScript.ParsedScript); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } catch (TimeoutException e) { @@ -496,9 +500,9 @@ protected override object InnerCallFunction(string functionName, params object[] { functionValue = _jsEngine.GetValue(functionName); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } OriginalValue resultValue; @@ -507,9 +511,9 @@ protected override object InnerCallFunction(string functionName, params object[] { resultValue = _jsEngine.Invoke(functionValue, args); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } catch (TimeoutException e) { @@ -566,9 +570,9 @@ protected override object InnerGetVariableValue(string variableName) { variableValue = _jsEngine.GetValue(variableName); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } result = MapToHostType(variableValue); @@ -594,9 +598,9 @@ protected override void InnerSetVariableValue(string variableName, object value) { _jsEngine.SetValue(variableName, processedValue); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } } } @@ -616,9 +620,9 @@ protected override void InnerEmbedHostObject(string itemName, object value) { _jsEngine.SetValue(itemName, processedValue); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } } } @@ -633,9 +637,9 @@ protected override void InnerEmbedHostType(string itemName, Type type) { _jsEngine.SetValue(itemName, typeReference); } - catch (OriginalRuntimeException e) + catch (OriginalException e) { - throw WrapRuntimeException(e); + throw WrapException(e); } } } @@ -687,14 +691,14 @@ public override void Dispose() { lock (_executionSynchronizer) { - if (_jsEngine != null) + if (_jsEngine is not null) { - if (_debuggerStepCallback != null) + if (_debuggerStepCallback is not null) { _jsEngine.Debugger.Step -= _debuggerStepCallback; } - if (_debuggerBreakCallback != null) + if (_debuggerBreakCallback is not null) { _jsEngine.Debugger.Break -= _debuggerBreakCallback; } @@ -707,7 +711,7 @@ public override void Dispose() _debuggerBreakCallback = null; _cancellationConstraint = null; - if (_cancellationTokenSource != null) + if (_cancellationTokenSource is not null) { _cancellationTokenSource.Dispose(); _cancellationTokenSource = null; diff --git a/src/JavaScriptEngineSwitcher.Jint/JintPrecompiledScript.cs b/src/JavaScriptEngineSwitcher.Jint/JintPrecompiledScript.cs index 84a1bef3..0d36e5b9 100644 --- a/src/JavaScriptEngineSwitcher.Jint/JintPrecompiledScript.cs +++ b/src/JavaScriptEngineSwitcher.Jint/JintPrecompiledScript.cs @@ -1,4 +1,4 @@ -using OriginalParsedScript = Jint.Prepared; +using OriginalParsedScript = Jint.Prepared; using JavaScriptEngineSwitcher.Core; diff --git a/src/JavaScriptEngineSwitcher.Jint/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Jint/JsEngineFactoryCollectionExtensions.cs index fd0f6e6a..5e7165b1 100644 --- a/src/JavaScriptEngineSwitcher.Jint/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Jint/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddJint(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddJint(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddJint(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -60,12 +60,12 @@ public static JsEngineFactoryCollection AddJint(this JsEngineFactoryCollection s /// Instance of public static JsEngineFactoryCollection AddJint(this JsEngineFactoryCollection source, JintSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.Jint/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.Jint/PACKAGE-DESCRIPTION.md index 79421502..c41cdf30 100644 --- a/src/JavaScriptEngineSwitcher.Jint/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.Jint/PACKAGE-DESCRIPTION.md @@ -1 +1 @@ -JavaScriptEngineSwitcher.Jint contains a `JintJsEngine` adapter (wrapper for the [Jint](http://github.com/sebastienros/jint) version 3.1.1). \ No newline at end of file +JavaScriptEngineSwitcher.Jint contains a `JintJsEngine` adapter (wrapper for the [Jint](http://github.com/sebastienros/jint) version 4.6.3). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.Jint/readme.txt b/src/JavaScriptEngineSwitcher.Jint/readme.txt index 4bbdc323..5692fc6b 100644 --- a/src/JavaScriptEngineSwitcher.Jint/readme.txt +++ b/src/JavaScriptEngineSwitcher.Jint/readme.txt @@ -1,23 +1,23 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: Jint v3.25.0 + README file for JS Engine Switcher: Jint v3.33.1 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== JavaScriptEngineSwitcher.Jint contains a `JintJsEngine` adapter (wrapper for the - Jint (http://github.com/sebastienros/jint) version 3.1.1). + Jint (http://github.com/sebastienros/jint) version 4.6.3). ============= RELEASE NOTES ============= - Jint was updated to version 3.1.1. + Jint was updated to version 4.6.3. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.Jurassic/FileScriptSource.cs b/src/JavaScriptEngineSwitcher.Jurassic/FileScriptSource.cs index 3d8941e9..acf00123 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/FileScriptSource.cs +++ b/src/JavaScriptEngineSwitcher.Jurassic/FileScriptSource.cs @@ -37,7 +37,7 @@ internal sealed class FileScriptSource : OriginalScriptSource /// The text encoding public FileScriptSource(string documentName, string path, Encoding encoding = null) { - if (documentName == null) + if (documentName is null) { throw new ArgumentNullException( nameof(documentName), @@ -45,7 +45,7 @@ public FileScriptSource(string documentName, string path, Encoding encoding = nu ); } - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), diff --git a/src/JavaScriptEngineSwitcher.Jurassic/JavaScriptEngineSwitcher.Jurassic.csproj b/src/JavaScriptEngineSwitcher.Jurassic/JavaScriptEngineSwitcher.Jurassic.csproj index 07d9744c..cf3f07d3 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/JavaScriptEngineSwitcher.Jurassic.csproj +++ b/src/JavaScriptEngineSwitcher.Jurassic/JavaScriptEngineSwitcher.Jurassic.csproj @@ -2,11 +2,12 @@ JS Engine Switcher: Jurassic - 3.24.1 - net40-client;net45;netstandard2.0 + 3.31.0 + net40-client;net45;netstandard2.0;net10.0 Library true $(NoWarn);CS1591 + false true @@ -20,10 +21,14 @@ ../../Icons/JavaScriptEngineSwitcher_Jurassic_Logo128x128.png JavaScriptEngineSwitcher.Jurassic contains a `JurassicJsEngine` adapter (wrapper for the Jurassic). $(PackageCommonTags);Jurassic + 1. Performed a migration to the modern C# null/not-null checks; +2. Added support for .NET 10; +3. In the `lock` statements for .NET 10 target now uses a instances of the `System.Threading.Lock` class; +4. Reduced a memory allocation by using collection expressions. - + diff --git a/src/JavaScriptEngineSwitcher.Jurassic/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Jurassic/JsEngineFactoryCollectionExtensions.cs index 265afab0..754372a8 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Jurassic/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddJurassic(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddJurassic(this JsEngineFactoryCollecti public static JsEngineFactoryCollection AddJurassic(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -61,12 +61,12 @@ public static JsEngineFactoryCollection AddJurassic(this JsEngineFactoryCollecti public static JsEngineFactoryCollection AddJurassic(this JsEngineFactoryCollection source, JurassicSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.Jurassic/JurassicJsEngine.cs b/src/JavaScriptEngineSwitcher.Jurassic/JurassicJsEngine.cs index 188cb4d2..a7683d93 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/JurassicJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.Jurassic/JurassicJsEngine.cs @@ -4,6 +4,11 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Text; +#if NET10_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif using OriginalCompatibilityMode = Jurassic.CompatibilityMode; using OriginalCompiledScript = Jurassic.CompiledScript; @@ -45,7 +50,7 @@ public sealed class JurassicJsEngine : JsEngineBase /// /// Version of original JS engine /// - private const string EngineVersion = "Nov 1, 2023"; + private const string EngineVersion = "Feb 4, 2025"; /// /// Jurassic JS engine @@ -55,7 +60,7 @@ public sealed class JurassicJsEngine : JsEngineBase /// /// Synchronizer of code execution /// - private readonly object _executionSynchronizer = new object(); + private readonly Lock _executionSynchronizer = new Lock(); /// /// Unique document name manager @@ -106,7 +111,7 @@ public JurassicJsEngine(JurassicSettings settings) /// The mapped value private static object MapToScriptType(object value) { - if (value == null) + if (value is null) { return OriginalNull.Value; } @@ -196,7 +201,7 @@ private static T MapToHostType(OriginalEngine engine, object value) } catch (ArgumentException e) { - if (targetType == typeof(string) && value != null) + if (targetType == typeof(string) && value is not null) { return (T)(object)value.ToString(); } @@ -243,7 +248,7 @@ private static WrapperException WrapJavaScriptException(OriginalEngine engine, object errorObject = originalJavaScriptException.GetErrorObject(engine); var errorValue = errorObject as OriginalErrorInstance; - if (errorValue != null) + if (errorValue is not null) { messageWithCallStack = errorValue.Stack; } @@ -263,10 +268,8 @@ private static WrapperException WrapJavaScriptException(OriginalEngine engine, { if (message.Length < messageWithCallStack.Length) { - string rawCallStack = messageWithCallStack - .TrimStart(message) - .TrimStart(new char[] { '\n', '\r' }) - ; + string rawCallStack = JsErrorHelpers.GetErrorLocationFromMessage( + messageWithCallStack, message); ErrorLocationItem[] callStackItems = JsErrorHelpers.ParseErrorLocation(rawCallStack); if (callStackItems.Length > 0) @@ -498,7 +501,7 @@ protected override void InnerExecute(string code, string documentName) protected override void InnerExecute(IPrecompiledScript precompiledScript) { var jurassicPrecompiledScript = precompiledScript as JurassicPrecompiledScript; - if (jurassicPrecompiledScript == null) + if (jurassicPrecompiledScript is null) { throw new WrapperUsageException( string.Format(CoreStrings.Usage_CannotConvertPrecompiledScriptToInternalType, @@ -624,7 +627,7 @@ protected override void InnerEmbedHostObject(string itemName, object value) try { var delegateValue = processedValue as Delegate; - if (delegateValue != null) + if (delegateValue is not null) { _jsEngine.SetGlobalFunction(itemName, delegateValue); } @@ -697,7 +700,7 @@ public override IPrecompiledScript PrecompileFile(string path, Encoding encoding { VerifyNotDisposed(); - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), @@ -748,7 +751,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Type { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -756,7 +759,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Type ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -786,7 +789,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Type Assembly assembly = type.GetTypeInfo().Assembly; #endif string nameSpace = type.Namespace; - string resourceFullName = nameSpace != null ? nameSpace + "." + resourceName : resourceName; + string resourceFullName = nameSpace is not null ? nameSpace + "." + resourceName : resourceName; OriginalCompiledScript compiledScript; string uniqueDocumentName = _documentNameManager.GetUniqueName(resourceFullName); @@ -815,7 +818,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Assem { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -823,7 +826,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Assem ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -874,7 +877,7 @@ public override void ExecuteFile(string path, Encoding encoding = null) { VerifyNotDisposed(); - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), @@ -922,7 +925,7 @@ public override void ExecuteResource(string resourceName, Type type) { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -930,7 +933,7 @@ public override void ExecuteResource(string resourceName, Type type) ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -960,7 +963,7 @@ public override void ExecuteResource(string resourceName, Type type) Assembly assembly = type.GetTypeInfo().Assembly; #endif string nameSpace = type.Namespace; - string resourceFullName = nameSpace != null ? nameSpace + "." + resourceName : resourceName; + string resourceFullName = nameSpace is not null ? nameSpace + "." + resourceName : resourceName; string uniqueDocumentName = _documentNameManager.GetUniqueName(resourceFullName); lock (_executionSynchronizer) @@ -985,7 +988,7 @@ public override void ExecuteResource(string resourceName, Assembly assembly) { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -993,7 +996,7 @@ public override void ExecuteResource(string resourceName, Assembly assembly) ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), diff --git a/src/JavaScriptEngineSwitcher.Jurassic/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.Jurassic/PACKAGE-DESCRIPTION.md index df12a8a5..ad182c32 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.Jurassic/PACKAGE-DESCRIPTION.md @@ -1 +1 @@ -JavaScriptEngineSwitcher.Jurassic contains a `JurassicJsEngine` adapter (wrapper for the [Jurassic](http://github.com/paulbartrum/jurassic) version of November 1, 2023). \ No newline at end of file +JavaScriptEngineSwitcher.Jurassic contains a `JurassicJsEngine` adapter (wrapper for the [Jurassic](http://github.com/paulbartrum/jurassic) version of February 4, 2025). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.Jurassic/ResourceScriptSource.cs b/src/JavaScriptEngineSwitcher.Jurassic/ResourceScriptSource.cs index b295b27b..1a178c97 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/ResourceScriptSource.cs +++ b/src/JavaScriptEngineSwitcher.Jurassic/ResourceScriptSource.cs @@ -37,7 +37,7 @@ internal sealed class ResourceScriptSource : OriginalScriptSource /// The assembly, which contains the embedded resource public ResourceScriptSource(string documentName, string resourceName, Assembly assembly) { - if (documentName == null) + if (documentName is null) { throw new ArgumentNullException( nameof(documentName), @@ -45,7 +45,7 @@ public ResourceScriptSource(string documentName, string resourceName, Assembly a ); } - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -53,7 +53,7 @@ public ResourceScriptSource(string documentName, string resourceName, Assembly a ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -103,7 +103,7 @@ public override TextReader GetReader() { Stream stream = _assembly.GetManifestResourceStream(_resourceName); - if (stream == null) + if (stream is null) { throw new NullReferenceException( string.Format(CoreStrings.Common_ResourceIsNull, _resourceName)); diff --git a/src/JavaScriptEngineSwitcher.Jurassic/readme.txt b/src/JavaScriptEngineSwitcher.Jurassic/readme.txt index b3e3b3a0..88e9ed85 100644 --- a/src/JavaScriptEngineSwitcher.Jurassic/readme.txt +++ b/src/JavaScriptEngineSwitcher.Jurassic/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: Jurassic v3.24.1 + README file for JS Engine Switcher: Jurassic v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -13,7 +13,16 @@ =========== JavaScriptEngineSwitcher.Jurassic contains a `JurassicJsEngine` adapter (wrapper for the Jurassic (http://github.com/paulbartrum/jurassic) version of - November 1, 2023). + February 4, 2025). + + ============= + RELEASE NOTES + ============= + 1. Performed a migration to the modern C# null/not-null checks; + 2. Added support for .NET 10; + 3. In the `lock` statements for .NET 10 target now uses a instances of the + `System.Threading.Lock` class; + 4. Reduced a memory allocation by using collection expressions. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.Msie/JavaScriptEngineSwitcher.Msie.csproj b/src/JavaScriptEngineSwitcher.Msie/JavaScriptEngineSwitcher.Msie.csproj index 3576fb30..18358dbd 100644 --- a/src/JavaScriptEngineSwitcher.Msie/JavaScriptEngineSwitcher.Msie.csproj +++ b/src/JavaScriptEngineSwitcher.Msie/JavaScriptEngineSwitcher.Msie.csproj @@ -2,12 +2,13 @@ JS Engine Switcher: MSIE - 3.24.1 - net40-client;net45;netstandard1.3;netstandard2.0 + 3.31.0 + net40-client;net45;netstandard1.3;netstandard2.0;netstandard2.1;net10.0 1.6.0 Library true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NETSDK1215;NU1903 + false true true @@ -22,11 +23,13 @@ ../../Icons/JavaScriptEngineSwitcher_Msie_Logo128x128.png JavaScriptEngineSwitcher.Msie contains a `MsieJsEngine` adapter (wrapper for the MSIE JavaScript Engine for .NET). $(PackageCommonTags);MSIE;IE;Chakra - MSIE JavaScript Engine was updated to version 3.2.5. + 1. MSIE JavaScript Engine was updated to version 3.3.1; +2. Performed a migration to the modern C# null/not-null checks; +3. Added support for .NET Standard 2.1 and .NET 10. - + diff --git a/src/JavaScriptEngineSwitcher.Msie/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Msie/JsEngineFactoryCollectionExtensions.cs index dd5d4910..e2ec5fce 100644 --- a/src/JavaScriptEngineSwitcher.Msie/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Msie/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -61,12 +61,12 @@ public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection source, MsieSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.Msie/MsieJsEngine.cs b/src/JavaScriptEngineSwitcher.Msie/MsieJsEngine.cs index 0e438370..88bf2a0e 100644 --- a/src/JavaScriptEngineSwitcher.Msie/MsieJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.Msie/MsieJsEngine.cs @@ -136,12 +136,12 @@ private WrapperException WrapJsException(OriginalException originalException) WrapperException wrapperException; var originalScriptException = originalException as OriginalScriptException; - if (originalScriptException != null) + if (originalScriptException is not null) { WrapperScriptException wrapperScriptException; var originalRuntimeException = originalScriptException as OriginalRuntimeException; - if (originalRuntimeException != null) + if (originalRuntimeException is not null) { WrapperRuntimeException wrapperRuntimeException; if (originalRuntimeException is OriginalInterruptedException) @@ -294,7 +294,7 @@ protected override void InnerExecute(string code, string documentName) protected override void InnerExecute(IPrecompiledScript precompiledScript) { var msiePrecompiledScript = precompiledScript as MsiePrecompiledScript; - if (msiePrecompiledScript == null) + if (msiePrecompiledScript is null) { throw new WrapperUsageException( string.Format(CoreStrings.Usage_CannotConvertPrecompiledScriptToInternalType, @@ -483,7 +483,7 @@ public override IPrecompiledScript PrecompileFile(string path, Encoding encoding { VerifyNotDisposed(); - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), @@ -529,7 +529,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Type { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -537,7 +537,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Type ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -583,7 +583,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Assem { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -591,7 +591,7 @@ public override IPrecompiledScript PrecompileResource(string resourceName, Assem ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -637,7 +637,7 @@ public override void ExecuteFile(string path, Encoding encoding = null) { VerifyNotDisposed(); - if (path == null) + if (path is null) { throw new ArgumentNullException( nameof(path), @@ -679,7 +679,7 @@ public override void ExecuteResource(string resourceName, Type type) { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -687,7 +687,7 @@ public override void ExecuteResource(string resourceName, Type type) ); } - if (type == null) + if (type is null) { throw new ArgumentNullException( nameof(type), @@ -729,7 +729,7 @@ public override void ExecuteResource(string resourceName, Assembly assembly) { VerifyNotDisposed(); - if (resourceName == null) + if (resourceName is null) { throw new ArgumentNullException( nameof(resourceName), @@ -737,7 +737,7 @@ public override void ExecuteResource(string resourceName, Assembly assembly) ); } - if (assembly == null) + if (assembly is null) { throw new ArgumentNullException( nameof(assembly), @@ -783,7 +783,7 @@ public override void Dispose() { if (_disposedFlag.Set()) { - if (_jsEngine != null) + if (_jsEngine is not null) { _jsEngine.Dispose(); _jsEngine = null; diff --git a/src/JavaScriptEngineSwitcher.Msie/readme.txt b/src/JavaScriptEngineSwitcher.Msie/readme.txt index 2f82f48b..a69e324c 100644 --- a/src/JavaScriptEngineSwitcher.Msie/readme.txt +++ b/src/JavaScriptEngineSwitcher.Msie/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: MSIE v3.24.1 + README file for JS Engine Switcher: MSIE v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -19,7 +19,9 @@ ============= RELEASE NOTES ============= - MSIE JavaScript Engine was updated to version 3.2.5. + 1. MSIE JavaScript Engine was updated to version 3.3.1; + 2. Performed a migration to the modern C# null/not-null checks; + 3. Added support for .NET Standard 2.1 and .NET 10. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.NiL/Helpers/NiLJsErrorHelpers.cs b/src/JavaScriptEngineSwitcher.NiL/Helpers/NiLJsErrorHelpers.cs index 91474ef0..c46a3d8f 100644 --- a/src/JavaScriptEngineSwitcher.NiL/Helpers/NiLJsErrorHelpers.cs +++ b/src/JavaScriptEngineSwitcher.NiL/Helpers/NiLJsErrorHelpers.cs @@ -1,13 +1,8 @@ using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Text.RegularExpressions; -using JavaScriptEngineSwitcher.Core.Extensions; using JavaScriptEngineSwitcher.Core.Helpers; -using CoreStrings = JavaScriptEngineSwitcher.Core.Resources.Strings; - namespace JavaScriptEngineSwitcher.NiL.Helpers { /// @@ -41,60 +36,59 @@ internal static class NiLJsErrorHelpers /// - /// Parses a string representation of the script error location to produce an array of - /// instances + /// Removes a .NET stack trace from string representation of the script error location /// /// String representation of the script error location - /// An array of instances - public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) + /// String representation of the script error location without .NET stack trace + public static string RemoveDotNetStackTraceFromErrorLocation(string errorLocation) { if (string.IsNullOrWhiteSpace(errorLocation)) { - return new ErrorLocationItem[0]; + return string.Empty; } - var errorLocationItems = new List(); - string[] lines = errorLocation.SplitToLines(); - int lineCount = lines.Length; + string jsErrorLocation = errorLocation; + int dotNetStackTraceIndex = errorLocation.IndexOf(DotNetStackTraceLinePrefix, StringComparison.Ordinal); - for (int lineIndex = 0; lineIndex < lineCount; lineIndex++) + if (dotNetStackTraceIndex != -1) { - string line = lines[lineIndex]; + jsErrorLocation = errorLocation.Substring(0, dotNetStackTraceIndex); + } - if (line.Length == 0) - { - continue; - } + return jsErrorLocation; + } - // Completing parsing when a .NET stack trace is found - if (line.StartsWith(DotNetStackTraceLinePrefix, StringComparison.Ordinal)) - { - break; - } + /// + /// Parses a string representation of the script error location to produce an array of + /// instances + /// + /// String representation of the script error location + /// An array of instances + public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) + { + return JsErrorHelpers.ParseErrorLocation(errorLocation, MapErrorLocationItem); + } - Match lineMatch = _errorLocationLineRegex.Match(line); - if (lineMatch.Success) - { - GroupCollection lineGroups = lineMatch.Groups; - Group lineNumberGroup = lineGroups["lineNumber"]; - Group columnNumberGroup = lineGroups["columnNumber"]; - - var errorLocationItem = new ErrorLocationItem - { - FunctionName = lineGroups["functionName"].Value, - LineNumber = lineNumberGroup.Success ? int.Parse(lineNumberGroup.Value) : 0, - ColumnNumber = columnNumberGroup.Success ? int.Parse(columnNumberGroup.Value) : 0, - }; - errorLocationItems.Add(errorLocationItem); - } - else + private static ErrorLocationItem MapErrorLocationItem(string errorLocationLine) + { + ErrorLocationItem item = null; + Match lineMatch = _errorLocationLineRegex.Match(errorLocationLine); + + if (lineMatch.Success) + { + GroupCollection lineGroups = lineMatch.Groups; + Group lineNumberGroup = lineGroups["lineNumber"]; + Group columnNumberGroup = lineGroups["columnNumber"]; + + item = new ErrorLocationItem { - Debug.WriteLine(string.Format(CoreStrings.Runtime_InvalidErrorLocationLineFormat, line)); - return new ErrorLocationItem[0]; - } + FunctionName = lineGroups["functionName"].Value, + LineNumber = lineNumberGroup.Success ? int.Parse(lineNumberGroup.Value) : 0, + ColumnNumber = columnNumberGroup.Success ? int.Parse(columnNumberGroup.Value) : 0, + }; } - return errorLocationItems.ToArray(); + return item; } /// diff --git a/src/JavaScriptEngineSwitcher.NiL/JavaScriptEngineSwitcher.NiL.csproj b/src/JavaScriptEngineSwitcher.NiL/JavaScriptEngineSwitcher.NiL.csproj index 2f49f63a..cb8b37e1 100644 --- a/src/JavaScriptEngineSwitcher.NiL/JavaScriptEngineSwitcher.NiL.csproj +++ b/src/JavaScriptEngineSwitcher.NiL/JavaScriptEngineSwitcher.NiL.csproj @@ -2,11 +2,12 @@ JS Engine Switcher: NiL - 3.24.1 - net461;net48;netcoreapp3.1;net5.0;net6.0;net7.0 + 3.33.0 + net461;net48;netstandard2.1;net8.0;net9.0;net10.0 Library true $(NoWarn);CS1591 + false true false @@ -21,11 +22,13 @@ ../../Icons/JavaScriptEngineSwitcher_NiL_Logo128x128.png JavaScriptEngineSwitcher.NiL contains a `NiLJsEngine` adapter (wrapper for the NiL.JS). $(PackageCommonTags);NiL + 1. NiL.JS was updated to version 2.6.1721; +2. Added support for .NET Standard 2.1. - + diff --git a/src/JavaScriptEngineSwitcher.NiL/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.NiL/JsEngineFactoryCollectionExtensions.cs index 985d6ef5..bd122e42 100644 --- a/src/JavaScriptEngineSwitcher.NiL/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.NiL/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddNiL(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddNiL(this JsEngineFactoryCollection so public static JsEngineFactoryCollection AddNiL(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -60,12 +60,12 @@ public static JsEngineFactoryCollection AddNiL(this JsEngineFactoryCollection so /// Instance of public static JsEngineFactoryCollection AddNiL(this JsEngineFactoryCollection source, NiLSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.NiL/NiLJsEngine.cs b/src/JavaScriptEngineSwitcher.NiL/NiLJsEngine.cs index 075d0155..ace1ee3a 100644 --- a/src/JavaScriptEngineSwitcher.NiL/NiLJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.NiL/NiLJsEngine.cs @@ -1,5 +1,10 @@ using System; using System.Text.RegularExpressions; +#if NET9_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif using NiL.JS.Extensions; @@ -41,13 +46,13 @@ public sealed class NiLJsEngine : JsEngineBase /// /// Version of original JS engine /// - private const string EngineVersion = "2.5.1677"; + private const string EngineVersion = "2.6.1721"; /// /// Regular expression for working with the syntax error message /// private static readonly Regex _syntaxErrorMessageRegex = - new Regex(@"^(?[\s\S]+?) (?:at )?\((?\d+):(?\d+)\)$"); + new Regex(@"^(?[\s\S]+?) (?:at )?\((?\d+):(?\d+)(?:\*\d+)?\)$"); /// /// NiL JS context @@ -62,7 +67,7 @@ public sealed class NiLJsEngine : JsEngineBase /// /// Synchronizer /// - private readonly object _synchronizer = new object(); + private readonly Lock _synchronizer = new Lock(); /// @@ -85,7 +90,7 @@ public NiLJsEngine(NiLSettings settings) { _jsContext = new OriginalContext(niLSettings.StrictMode); _jsContext.Debugging = niLSettings.EnableDebugging; - if (_debuggerCallback != null) + if (_debuggerCallback is not null) { _jsContext.DebuggerCallback += _debuggerCallback; } @@ -106,7 +111,7 @@ public NiLJsEngine(NiLSettings settings) /// The mapped value private static OriginalValue MapToScriptType(object value) { - if (value == null) + if (value is null) { return OriginalValue.Null; } @@ -173,7 +178,7 @@ private static WrapperException WrapJsException(OriginalException originalExcept string sourceFragment = string.Empty; var errorValue = originalException.Error?.Value as OriginalError; - if (errorValue != null) + if (errorValue is not null) { message = errorValue.message.As(); description = message; @@ -203,7 +208,7 @@ private static WrapperException WrapJsException(OriginalException originalExcept { string sourceCode = originalException.SourceCode; OriginalCodeCoordinates codeCoordinates = originalException.CodeCoordinates; - if (codeCoordinates != null) + if (codeCoordinates is not null) { lineNumber = codeCoordinates.Line; columnNumber = codeCoordinates.Column; @@ -211,8 +216,11 @@ private static WrapperException WrapJsException(OriginalException originalExcept sourceFragment = TextHelpers.GetTextFragment(sourceCode, lineNumber, columnNumber); string callStack = string.Empty; - ErrorLocationItem[] callStackItems = NiLJsErrorHelpers.ParseErrorLocation( + string jsStackTrace = NiLJsErrorHelpers.RemoveDotNetStackTraceFromErrorLocation( originalException.StackTrace); + ErrorLocationItem[] callStackItems = NiLJsErrorHelpers.ParseErrorLocation( + jsStackTrace); + if (callStackItems.Length > 0) { NiLJsErrorHelpers.FixErrorLocationItems(callStackItems); @@ -352,7 +360,7 @@ protected override object InnerCallFunction(string functionName, params object[] { OriginalValue functionValue = _jsContext.GetVariable(functionName); var function = functionValue.As(); - if (function == null) + if (function is null) { throw new WrapperRuntimeException( string.Format(CoreStrings.Runtime_FunctionNotExist, functionName)); @@ -567,9 +575,9 @@ public override void Dispose() { lock (_synchronizer) { - if (_jsContext != null) + if (_jsContext is not null) { - if (_debuggerCallback != null) + if (_debuggerCallback is not null) { _jsContext.DebuggerCallback -= _debuggerCallback; _debuggerCallback = null; diff --git a/src/JavaScriptEngineSwitcher.NiL/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.NiL/PACKAGE-DESCRIPTION.md index 67e6b199..acb9968f 100644 --- a/src/JavaScriptEngineSwitcher.NiL/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.NiL/PACKAGE-DESCRIPTION.md @@ -1 +1 @@ -JavaScriptEngineSwitcher.NiL contains a `NiLJsEngine` adapter (wrapper for the [NiL.JS](https://github.com/nilproject/NiL.JS) version 2.5.1677). \ No newline at end of file +JavaScriptEngineSwitcher.NiL contains a `NiLJsEngine` adapter (wrapper for the [NiL.JS](https://github.com/nilproject/NiL.JS) version 2.6.1721). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.NiL/readme.txt b/src/JavaScriptEngineSwitcher.NiL/readme.txt index 2ba38fb5..2a2da490 100644 --- a/src/JavaScriptEngineSwitcher.NiL/readme.txt +++ b/src/JavaScriptEngineSwitcher.NiL/readme.txt @@ -1,18 +1,24 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: NiL v3.24.1 + README file for JS Engine Switcher: NiL v3.33.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== JavaScriptEngineSwitcher.NiL contains a `NiLJsEngine` adapter (wrapper for the - NiL.JS (https://github.com/nilproject/NiL.JS) version 2.5.1677). + NiL.JS (https://github.com/nilproject/NiL.JS) version 2.6.1721). + + ============= + RELEASE NOTES + ============= + 1. NiL.JS was updated to version 2.6.1721; + 2. Added support for .NET Standard 2.1. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.Node/Helpers/NodeJsErrorHelpers.cs b/src/JavaScriptEngineSwitcher.Node/Helpers/NodeJsErrorHelpers.cs index 4322ad75..742eba07 100644 --- a/src/JavaScriptEngineSwitcher.Node/Helpers/NodeJsErrorHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Node/Helpers/NodeJsErrorHelpers.cs @@ -1,13 +1,8 @@ using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Text.RegularExpressions; -using JavaScriptEngineSwitcher.Core.Extensions; using JavaScriptEngineSwitcher.Core.Helpers; -using CoreStrings = JavaScriptEngineSwitcher.Core.Resources.Strings; - namespace JavaScriptEngineSwitcher.Node.Helpers { /// @@ -57,49 +52,32 @@ internal static class NodeJsErrorHelpers /// An array of instances public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) { - if (string.IsNullOrWhiteSpace(errorLocation)) - { - return new ErrorLocationItem[0]; - } + return JsErrorHelpers.ParseErrorLocation(errorLocation, MapErrorLocationItem); + } - var errorLocationItems = new List(); - string[] lines = errorLocation.SplitToLines(); - int lineCount = lines.Length; + private static ErrorLocationItem MapErrorLocationItem(string errorLocationLine) + { + ErrorLocationItem item = null; + Match lineMatch = _errorLocationLineRegex.Match(errorLocationLine); - for (int lineIndex = 0; lineIndex < lineCount; lineIndex++) + if (lineMatch.Success) { - string line = lines[lineIndex]; - if (line.Length == 0) - { - continue; - } - - Match lineMatch = _errorLocationLineRegex.Match(line); + GroupCollection lineGroups = lineMatch.Groups; + Group lineNumberGroup = lineGroups["lineNumber"]; + Group columnNumberGroup = lineGroups["columnNumber"]; - if (lineMatch.Success) - { - GroupCollection lineGroups = lineMatch.Groups; - Group lineNumberGroup = lineGroups["lineNumber"]; - Group columnNumberGroup = lineGroups["columnNumber"]; - - var errorLocationItem = new ErrorLocationItem - { - FunctionName = lineGroups["functionName"].Value, - DocumentName = lineGroups["documentName"].Value, - LineNumber = lineNumberGroup.Success ? int.Parse(lineNumberGroup.Value) : 0, - ColumnNumber = columnNumberGroup.Success ? int.Parse(columnNumberGroup.Value) : 0, - SourceFragment = lineGroups["sourceFragment"].Value - }; - errorLocationItems.Add(errorLocationItem); - } - else + item = new ErrorLocationItem { - Debug.WriteLine(string.Format(CoreStrings.Runtime_InvalidErrorLocationLineFormat, line)); - return new ErrorLocationItem[0]; - } + FunctionName = lineGroups["functionName"].Value, + DocumentName = lineGroups["documentName"].Value, + LineNumber = lineNumberGroup.Success ? int.Parse(lineNumberGroup.Value) : 0, + ColumnNumber = columnNumberGroup.Success ? int.Parse(columnNumberGroup.Value) : 0, + SourceFragment = lineGroups["sourceFragment"].Value + }; } - return errorLocationItems.ToArray(); + + return item; } /// diff --git a/src/JavaScriptEngineSwitcher.Node/JavaScriptEngineSwitcher.Node.csproj b/src/JavaScriptEngineSwitcher.Node/JavaScriptEngineSwitcher.Node.csproj index 2c4e5ccd..64332ffd 100644 --- a/src/JavaScriptEngineSwitcher.Node/JavaScriptEngineSwitcher.Node.csproj +++ b/src/JavaScriptEngineSwitcher.Node/JavaScriptEngineSwitcher.Node.csproj @@ -2,13 +2,14 @@ JS Engine Switcher: Node - 3.24.1 - net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0 + 3.31.0 + net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net10.0 Library true true true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NU1903 + false true true false @@ -23,6 +24,10 @@ ../../Icons/JavaScriptEngineSwitcher_Node_Logo128x128.png JavaScriptEngineSwitcher.Node contains a `NodeJsEngine` adapter (wrapper for the Jering.Javascript.NodeJS). $(PackageCommonTags);Node.js;Jering.Javascript.NodeJS + 1. Performed a migration to the modern C# null/not-null checks; +2. Added support for .NET 10; +3. In the `lock` statements for .NET 10 target now uses a instances of the `System.Threading.Lock` class; +4. Reduced a memory allocation by using collection expressions. diff --git a/src/JavaScriptEngineSwitcher.Node/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Node/JsEngineFactoryCollectionExtensions.cs index 81d1b4be..27b54c9b 100644 --- a/src/JavaScriptEngineSwitcher.Node/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Node/JsEngineFactoryCollectionExtensions.cs @@ -20,7 +20,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -40,12 +40,12 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, INodeJSService service) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (service == null) + if (service is null) { throw new ArgumentNullException(nameof(service)); } @@ -65,12 +65,12 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, IServiceCollection services) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } @@ -90,12 +90,12 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -118,12 +118,12 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, NodeSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } @@ -144,17 +144,17 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, INodeJSService service, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (service == null) + if (service is null) { throw new ArgumentNullException(nameof(service)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -178,17 +178,17 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, INodeJSService service, NodeSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (service == null) + if (service is null) { throw new ArgumentNullException(nameof(service)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } @@ -209,17 +209,17 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, IServiceCollection services, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -243,17 +243,17 @@ public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection s public static JsEngineFactoryCollection AddNode(this JsEngineFactoryCollection source, IServiceCollection services, NodeSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (services == null) + if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.Node/NodeJsEngine.cs b/src/JavaScriptEngineSwitcher.Node/NodeJsEngine.cs index b3c0b8ea..936ab751 100644 --- a/src/JavaScriptEngineSwitcher.Node/NodeJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.Node/NodeJsEngine.cs @@ -117,7 +117,7 @@ public NodeJsEngine(NodeSettings settings) /// Settings of the Node JS engine public NodeJsEngine(INodeJSService service, NodeSettings settings) { - if (service == null) + if (service is null) { throw new ArgumentNullException(nameof(service)); } @@ -143,7 +143,7 @@ public NodeJsEngine(INodeJSService service, NodeSettings settings) _executionTimeout = (int)nodeSettings.TimeoutInterval.TotalMilliseconds; _engineId = JsEngineIdGenerator.GetNextId(); - InvokeEngineHelper("addContext", new object[] { _engineId, nodeSettings.UseBuiltinLibrary }); + InvokeEngineHelper("addContext", [_engineId, nodeSettings.UseBuiltinLibrary]); } @@ -292,7 +292,7 @@ private WrapperException WrapInvocationException(InvocationException originalExc } else { - var errorLocationItems = new ErrorLocationItem[0]; + ErrorLocationItem[] errorLocationItems = []; int messageLength = message.Length; int messageWithTypeLength = messageWithTypeMatch.Length; @@ -383,8 +383,8 @@ protected override T InnerEvaluate(string expression, string documentName) try { - result = InvokeEngineHelper("evaluate", new object[] { _engineId, expression, uniqueDocumentName, - _executionTimeout }); + result = InvokeEngineHelper("evaluate", [_engineId, expression, uniqueDocumentName, + _executionTimeout]); } catch (InvocationException e) { @@ -405,7 +405,7 @@ protected override void InnerExecute(string code, string documentName) try { - InvokeEngineHelper("execute", new object[] { _engineId, code, uniqueDocumentName, _executionTimeout }); + InvokeEngineHelper("execute", [_engineId, code, uniqueDocumentName, _executionTimeout]); } catch (InvocationException e) { @@ -430,8 +430,8 @@ protected override T InnerCallFunction(string functionName, params object[] a try { - result = InvokeEngineHelper("callFunction", new object[] { _engineId, functionName, processedArgs, - _executionTimeout }); + result = InvokeEngineHelper("callFunction", [_engineId, functionName, processedArgs, + _executionTimeout]); } catch (InvocationException e) { @@ -443,7 +443,7 @@ protected override T InnerCallFunction(string functionName, params object[] a protected override bool InnerHasVariable(string variableName) { - return InvokeEngineHelper("hasVariable", new [] { _engineId, variableName }); + return InvokeEngineHelper("hasVariable", [_engineId, variableName]); } protected override object InnerGetVariableValue(string variableName) @@ -457,7 +457,7 @@ protected override T InnerGetVariableValue(string variableName) try { - result = InvokeEngineHelper("getVariableValue", new[] { _engineId, variableName }); + result = InvokeEngineHelper("getVariableValue", [_engineId, variableName]); } catch (InvocationException e) { @@ -473,7 +473,7 @@ protected override void InnerSetVariableValue(string variableName, object value) try { - InvokeEngineHelper("setVariableValue", new[] { _engineId, variableName, processedValue }); + InvokeEngineHelper("setVariableValue", [_engineId, variableName, processedValue]); } catch (InvocationException e) { @@ -485,7 +485,7 @@ protected override void InnerRemoveVariable(string variableName) { try { - InvokeEngineHelper("removeVariable", new[] { _engineId, variableName }); + InvokeEngineHelper("removeVariable", [_engineId, variableName]); } catch (InvocationException e) { @@ -548,7 +548,7 @@ public override void Dispose() { if (_disposedFlag.Set()) { - InvokeEngineHelper("removeContext", new[] { _engineId }); + InvokeEngineHelper("removeContext", [_engineId]); _jsService = null; } } diff --git a/src/JavaScriptEngineSwitcher.Node/NodeJsEngineFactory.cs b/src/JavaScriptEngineSwitcher.Node/NodeJsEngineFactory.cs index b805872a..70ce002c 100644 --- a/src/JavaScriptEngineSwitcher.Node/NodeJsEngineFactory.cs +++ b/src/JavaScriptEngineSwitcher.Node/NodeJsEngineFactory.cs @@ -1,4 +1,10 @@ -using Jering.Javascript.NodeJS; +#if NET10_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif + +using Jering.Javascript.NodeJS; using Microsoft.Extensions.DependencyInjection; using JavaScriptEngineSwitcher.Core; @@ -28,7 +34,7 @@ public sealed class NodeJsEngineFactory : IJsEngineFactory /// /// Synchronizer of Node JS service creation /// - private readonly object _creationSynchronizer = new object(); + private readonly Lock _creationSynchronizer = new Lock(); /// @@ -101,11 +107,11 @@ public string EngineName /// Instance of the Node JS engine public IJsEngine CreateEngine() { - if (_services != null && _jsService == null) + if (_services is not null && _jsService is null) { lock (_creationSynchronizer) { - if (_jsService == null) + if (_jsService is null) { ServiceProvider serviceProvider = _services.BuildServiceProvider(); _jsService = serviceProvider.GetRequiredService(); @@ -113,7 +119,7 @@ public IJsEngine CreateEngine() } } - IJsEngine engine = _jsService != null ? + IJsEngine engine = _jsService is not null ? new NodeJsEngine(_jsService, _settings) : new NodeJsEngine(_settings); return engine; diff --git a/src/JavaScriptEngineSwitcher.Node/readme.txt b/src/JavaScriptEngineSwitcher.Node/readme.txt index 4f89b068..1be3823f 100644 --- a/src/JavaScriptEngineSwitcher.Node/readme.txt +++ b/src/JavaScriptEngineSwitcher.Node/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: Node v3.24.1 + README file for JS Engine Switcher: Node v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -19,6 +19,15 @@ Node.js (https://nodejs.org) and add the `node.exe`'s directory to the `Path` environment variable (automatically done by the official installer). + ============= + RELEASE NOTES + ============= + 1. Performed a migration to the modern C# null/not-null checks; + 2. Added support for .NET 10; + 3. In the `lock` statements for .NET 10 target now uses a instances of the + `System.Threading.Lock` class; + 4. Reduced a memory allocation by using collection expressions. + ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj index 90b4842d..8f690be1 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj +++ b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: V8 for Linux (x64) - 3.24.2 + 3.31.0 netstandard2.0 @@ -15,7 +15,6 @@ ../../Icons/JavaScriptEngineSwitcher_V8_Logo128x128.png This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.linux-x64 package. $(PackageCommonTags);V8;ClearScript;Linux;x64 - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 version 12.3.219.12). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec index 8e060459..bf4bfdc0 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec +++ b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt index d9e7b0c2..ee0005af 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt +++ b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: V8 for Linux x64 v3.24.2 + README file for JS Engine Switcher: V8 for Linux x64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -14,12 +14,6 @@ This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.linux-x64 package. - ============= - RELEASE NOTES - ============= - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 - version 12.3.219.12). - ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj index 4c53c24a..85851e0a 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj +++ b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: V8 for OS X (x64) - 3.24.2 + 3.31.0 netstandard2.0 @@ -15,7 +15,6 @@ ../../Icons/JavaScriptEngineSwitcher_V8_Logo128x128.png This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.osx-x64 package. $(PackageCommonTags);V8;ClearScript;macOS;OSX;x64 - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 version 12.3.219.12). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec index 3cc50ac2..10bede4f 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec +++ b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt index b188fdac..b736654f 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt +++ b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: V8 for OS X x64 v3.24.2 + README file for JS Engine Switcher: V8 for OS X x64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -14,12 +14,6 @@ This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.osx-x64 package. - ============= - RELEASE NOTES - ============= - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 - version 12.3.219.12). - ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.csproj b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.csproj index 0f327edd..27d4a90c 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.csproj +++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: V8 for Windows (x64) - 3.24.2 + 3.31.0 netstandard2.0 @@ -15,7 +15,6 @@ ../../Icons/JavaScriptEngineSwitcher_V8_Logo128x128.png This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.win-x64 package. $(PackageCommonTags);V8;ClearScript;Windows;x64 - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 version 12.3.219.12). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec index 86d5fab4..7b52ae54 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec +++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt index 2b390f07..22c2fafc 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt +++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: V8 for Windows x64 v3.24.2 + README file for JS Engine Switcher: V8 for Windows x64 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -14,12 +14,6 @@ This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.win-x64 package. - ============= - RELEASE NOTES - ============= - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 - version 12.3.219.12). - ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.csproj b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.csproj index c59a5478..b8f303ba 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.csproj +++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.csproj @@ -2,7 +2,7 @@ JS Engine Switcher: V8 for Windows (x86) - 3.24.2 + 3.31.0 netstandard2.0 @@ -15,7 +15,6 @@ ../../Icons/JavaScriptEngineSwitcher_V8_Logo128x128.png This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.win-x86 package. $(PackageCommonTags);V8;ClearScript;Windows;x86 - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 version 12.3.219.12). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec index b23b88a5..4c5670eb 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec +++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt index bb751a94..e099946e 100644 --- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt +++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: V8 for Windows x86 v3.24.2 + README file for JS Engine Switcher: V8 for Windows x86 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -14,12 +14,6 @@ This package is deprecated. Instead, it is recommended to use a Microsoft.ClearScript.V8.Native.win-x86 package. - ============= - RELEASE NOTES - ============= - Microsoft ClearScript.V8 was updated to version 7.4.5 (support of the V8 - version 12.3.219.12). - ============= DOCUMENTATION ============= diff --git a/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj b/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj index 9dfef0f9..5d84b631 100644 --- a/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj +++ b/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj @@ -2,11 +2,12 @@ JS Engine Switcher: V8 - 3.24.2 - net45;net471;netstandard2.1;netcoreapp3.1;net5.0 + 3.31.0 + net462;net471;netstandard2.1;netcoreapp3.1;net5.0;net10.0 Library true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NU1903 + false true true false @@ -21,14 +22,15 @@ ../../Icons/JavaScriptEngineSwitcher_V8_Logo128x128.png JavaScriptEngineSwitcher.V8 contains a `V8JsEngine` adapter (wrapper for the Microsoft ClearScript.V8). $(PackageCommonTags);V8;ClearScript - 1. Microsoft ClearScript.V8 was updated to version 7.4.5; -2. In configuration settings of the V8 JS engine was added two new properties: `AddPerformanceObject` (default `false`) and `SetTimerResolution` (default `false`). + 1. Performed a migration to the modern C# null/not-null checks; +2. Added support for .NET 10; +3. Reduced a memory allocation by using collection expressions. - + - + diff --git a/src/JavaScriptEngineSwitcher.V8/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.V8/JsEngineFactoryCollectionExtensions.cs index 0e2a95e3..136e51b3 100644 --- a/src/JavaScriptEngineSwitcher.V8/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.V8/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddV8(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddV8(this JsEngineFactoryCollection sou public static JsEngineFactoryCollection AddV8(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -61,12 +61,12 @@ public static JsEngineFactoryCollection AddV8(this JsEngineFactoryCollection sou public static JsEngineFactoryCollection AddV8(this JsEngineFactoryCollection source, V8Settings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.V8/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.V8/PACKAGE-DESCRIPTION.md index d1837069..5c20ea92 100644 --- a/src/JavaScriptEngineSwitcher.V8/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.V8/PACKAGE-DESCRIPTION.md @@ -1,4 +1,4 @@ -JavaScriptEngineSwitcher.V8 contains a `V8JsEngine` adapter (wrapper for the [Microsoft ClearScript.V8](http://github.com/Microsoft/ClearScript) version 7.4.5). +JavaScriptEngineSwitcher.V8 contains a `V8JsEngine` adapter (wrapper for the [Microsoft ClearScript.V8](http://github.com/Microsoft/ClearScript) version 7.5). This package does not contain the native ClearScript.V8 assemblies. Therefore, you need to choose and install the most appropriate package(s) for your platform. diff --git a/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs b/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs index c4f6a52e..f2729927 100644 --- a/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs +++ b/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs @@ -4,6 +4,9 @@ using System.Text.RegularExpressions; using OriginalCacheKind = Microsoft.ClearScript.V8.V8CacheKind; +using OriginalCacheResult = Microsoft.ClearScript.V8.V8CacheResult; +using OriginalDocumentFlags = Microsoft.ClearScript.DocumentFlags; +using OriginalDocumentInfo = Microsoft.ClearScript.DocumentInfo; using OriginalEngine = Microsoft.ClearScript.V8.V8ScriptEngine; using OriginalEngineFlags = Microsoft.ClearScript.V8.V8ScriptEngineFlags; using OriginalException = Microsoft.ClearScript.ScriptEngineException; @@ -47,7 +50,7 @@ public sealed class V8JsEngine : JsEngineBase /// /// Version of original JS engine /// - private const string EngineVersion = "12.3.219.12"; + private const string EngineVersion = "13.3.415.23"; /// /// V8 JS engine @@ -222,16 +225,14 @@ private static WrapperException WrapScriptEngineException(OriginalException orig GroupCollection messageWithTypeGroups = messageWithTypeMatch.Groups; type = messageWithTypeGroups["type"].Value; description = messageWithTypeGroups["description"].Value; - var errorLocationItems = new ErrorLocationItem[0]; + ErrorLocationItem[] errorLocationItems = []; if (message.Length < messageWithErrorLocation.Length) { - string errorLocation = messageWithErrorLocation - .TrimStart(message) - .TrimStart(new char[] { '\n', '\r' }) - ; - + string errorLocation = JsErrorHelpers.GetErrorLocationFromMessage( + messageWithErrorLocation, message); errorLocationItems = JsErrorHelpers.ParseErrorLocation(errorLocation); + if (errorLocationItems.Length > 0) { ErrorLocationItem firstErrorLocationItem = errorLocationItems[0]; @@ -364,12 +365,13 @@ protected override IPrecompiledScript InnerPrecompile(string code) protected override IPrecompiledScript InnerPrecompile(string code, string documentName) { + var documentInfo = new OriginalDocumentInfo(documentName); var cacheKind = OriginalCacheKind.Code; byte[] cachedBytes; try { - using (OriginalScript generalScript = _jsEngine.Compile(documentName, code, cacheKind, + using (OriginalScript generalScript = _jsEngine.Compile(documentInfo, code, cacheKind, out cachedBytes)) { } } @@ -378,7 +380,7 @@ protected override IPrecompiledScript InnerPrecompile(string code, string docume throw WrapScriptEngineException(e); } - return new V8PrecompiledScript(code, cacheKind, cachedBytes, documentName); + return new V8PrecompiledScript(code, cacheKind, cachedBytes, documentInfo); } protected override object InnerEvaluate(string expression) @@ -388,11 +390,15 @@ protected override object InnerEvaluate(string expression) protected override object InnerEvaluate(string expression, string documentName) { + var documentInfo = new OriginalDocumentInfo(documentName) + { + Flags = OriginalDocumentFlags.None + }; object result; try { - result = _jsEngine.Evaluate(documentName, false, expression); + result = _jsEngine.Evaluate(documentInfo, expression); } catch (OriginalException e) { @@ -427,9 +433,14 @@ protected override void InnerExecute(string code) protected override void InnerExecute(string code, string documentName) { + var documentInfo = new OriginalDocumentInfo(documentName) + { + Flags = OriginalDocumentFlags.None + }; + try { - _jsEngine.Execute(documentName, false, code); + _jsEngine.Execute(documentInfo, code); } catch (OriginalException e) { @@ -444,7 +455,7 @@ protected override void InnerExecute(string code, string documentName) protected override void InnerExecute(IPrecompiledScript precompiledScript) { var v8PrecompiledScript = precompiledScript as V8PrecompiledScript; - if (v8PrecompiledScript == null) + if (v8PrecompiledScript is null) { throw new WrapperUsageException( string.Format(CoreStrings.Usage_CannotConvertPrecompiledScriptToInternalType, @@ -453,15 +464,15 @@ protected override void InnerExecute(IPrecompiledScript precompiledScript) ); } - bool cacheAccepted; + byte[] cachedBytes = v8PrecompiledScript.CachedBytes; try { - using (OriginalScript script = _jsEngine.Compile(v8PrecompiledScript.DocumentName, - v8PrecompiledScript.Code, v8PrecompiledScript.CacheKind, v8PrecompiledScript.CachedBytes, - out cacheAccepted)) + using (OriginalScript script = _jsEngine.Compile(v8PrecompiledScript.DocumentInfo, + v8PrecompiledScript.Code, v8PrecompiledScript.CacheKind, ref cachedBytes, + out var cacheResult)) { - if (!cacheAccepted) + if (cacheResult != OriginalCacheResult.Accepted && cacheResult != OriginalCacheResult.Verified) { throw new WrapperUsageException(Strings.Usage_PrecompiledScriptNotAccepted, Name, Version); } @@ -681,7 +692,7 @@ public override void Dispose() { if (_disposedFlag.Set()) { - if (_jsEngine != null) + if (_jsEngine is not null) { _jsEngine.Dispose(); _jsEngine = null; diff --git a/src/JavaScriptEngineSwitcher.V8/V8PrecompiledScript.cs b/src/JavaScriptEngineSwitcher.V8/V8PrecompiledScript.cs index f89f2eea..16464dd5 100644 --- a/src/JavaScriptEngineSwitcher.V8/V8PrecompiledScript.cs +++ b/src/JavaScriptEngineSwitcher.V8/V8PrecompiledScript.cs @@ -1,4 +1,5 @@ using OriginalCacheKind = Microsoft.ClearScript.V8.V8CacheKind; +using OriginalDocumentInfo = Microsoft.ClearScript.DocumentInfo; using JavaScriptEngineSwitcher.Core; @@ -37,9 +38,9 @@ public byte[] CachedBytes } /// - /// Gets a document name + /// Gets a meta-information for the document /// - public string DocumentName + public OriginalDocumentInfo DocumentInfo { get; private set; @@ -52,14 +53,14 @@ public string DocumentName /// The source code of the script /// The kind of cache data to be generated /// Cached data for accelerated recompilation - /// Document name + /// Meta-information for the document public V8PrecompiledScript(string code, OriginalCacheKind cacheKind, byte[] cachedBytes, - string documentName) + OriginalDocumentInfo documentInfo) { Code = code; CacheKind = cacheKind; CachedBytes = cachedBytes; - DocumentName = documentName; + DocumentInfo = documentInfo; } diff --git a/src/JavaScriptEngineSwitcher.V8/readme.txt b/src/JavaScriptEngineSwitcher.V8/readme.txt index d48a8bac..493c9528 100644 --- a/src/JavaScriptEngineSwitcher.V8/readme.txt +++ b/src/JavaScriptEngineSwitcher.V8/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: V8 v3.24.2 + README file for JS Engine Switcher: V8 v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -13,7 +13,7 @@ =========== JavaScriptEngineSwitcher.V8 contains a `V8JsEngine` adapter (wrapper for the Microsoft ClearScript.V8 (http://github.com/Microsoft/ClearScript) version - 7.4.5). + 7.5). This package does not contain the native ClearScript.V8 assemblies. Therefore, you need to choose and install the most appropriate package(s) for @@ -31,10 +31,9 @@ ============= RELEASE NOTES ============= - 1. Microsoft ClearScript.V8 was updated to version 7.4.5; - 2. In configuration settings of the V8 JS engine was added two new properties: - `AddPerformanceObject` (default `false`) and `SetTimerResolution` (default - `false`). + 1. Performed a migration to the modern C# null/not-null checks; + 2. Added support for .NET 10; + 3. Reduced a memory allocation by using collection expressions. ============= DOCUMENTATION diff --git a/src/JavaScriptEngineSwitcher.Vroom/JavaScriptEngineSwitcher.Vroom.csproj b/src/JavaScriptEngineSwitcher.Vroom/JavaScriptEngineSwitcher.Vroom.csproj index 8bb3ec0b..17070b1b 100644 --- a/src/JavaScriptEngineSwitcher.Vroom/JavaScriptEngineSwitcher.Vroom.csproj +++ b/src/JavaScriptEngineSwitcher.Vroom/JavaScriptEngineSwitcher.Vroom.csproj @@ -2,12 +2,13 @@ JS Engine Switcher: Vroom - 3.24.1 - net40-client;net45;net471;netstandard1.6;netstandard2.0 + 3.31.0 + net40-client;net45;net471;netstandard1.6;netstandard2.0;net10.0 1.6.0 Library true - $(NoWarn);CS1591 + $(NoWarn);CS1591;NETSDK1215;NU1903 + false true true @@ -22,6 +23,9 @@ ../../Icons/JavaScriptEngineSwitcher_Vroom_Logo128x128.png JavaScriptEngineSwitcher.Vroom contains a `VroomJsEngine` adapter (wrapper for the VroomJs). $(PackageCommonTags);VroomJs;V8 + 1. Performed a migration to the modern C# null/not-null checks; +2. Added support for .NET 10; +3. In the `lock` statements for .NET 10 target now uses a instances of the `System.Threading.Lock` class. @@ -32,7 +36,7 @@ - + diff --git a/src/JavaScriptEngineSwitcher.Vroom/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Vroom/JsEngineFactoryCollectionExtensions.cs index ac917976..a327c122 100644 --- a/src/JavaScriptEngineSwitcher.Vroom/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Vroom/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -61,12 +61,12 @@ public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection source, VroomSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.Vroom/Utilities/SimplisticJsSerializer.cs b/src/JavaScriptEngineSwitcher.Vroom/Utilities/SimplisticJsSerializer.cs index 4c29d4ce..d6461c0b 100644 --- a/src/JavaScriptEngineSwitcher.Vroom/Utilities/SimplisticJsSerializer.cs +++ b/src/JavaScriptEngineSwitcher.Vroom/Utilities/SimplisticJsSerializer.cs @@ -25,7 +25,7 @@ internal static class SimplisticJsSerializer /// The serialized JavaScript string public static string Serialize(object value) { - if (value == null) + if (value is null) { return "null"; } @@ -46,7 +46,7 @@ public static string Serialize(object value) break; case TypeCode.Int32: var convertible = value as IConvertible; - serializedValue = (convertible != null) ? + serializedValue = (convertible is not null) ? convertible.ToString(CultureInfo.InvariantCulture) : value.ToString(); break; case TypeCode.Double: @@ -96,7 +96,7 @@ private static string JsStringEncode(string value) if (CharRequiresJsEncoding(charValue)) { - if (sb == null) + if (sb is null) { sb = stringBuilderPool.Rent(); } @@ -143,7 +143,7 @@ private static string JsStringEncode(string value) } } - if (sb == null) + if (sb is null) { return value; } diff --git a/src/JavaScriptEngineSwitcher.Vroom/VroomJsEngine.cs b/src/JavaScriptEngineSwitcher.Vroom/VroomJsEngine.cs index 270b9ccd..0b2ecddf 100644 --- a/src/JavaScriptEngineSwitcher.Vroom/VroomJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.Vroom/VroomJsEngine.cs @@ -1,10 +1,15 @@ using System; using System.Collections.Generic; -#if NET45_OR_GREATER || NETSTANDARD +#if NET45_OR_GREATER || NETSTANDARD || NET10_0_OR_GREATER using System.Runtime.InteropServices; #endif using System.Text; using System.Text.RegularExpressions; +#if NET10_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif using AdvancedStringBuilder; #if NET40 @@ -75,7 +80,7 @@ public sealed class VroomJsEngine : JsEngineBase /// /// Synchronizer of code execution /// - private readonly object _executionSynchronizer = new object(); + private readonly Lock _executionSynchronizer = new Lock(); /// /// List of host items @@ -85,7 +90,7 @@ public sealed class VroomJsEngine : JsEngineBase /// /// Synchronizer of JS engine initialization /// - private static readonly object _initializationSynchronizer = new object(); + private static readonly Lock _initializationSynchronizer = new Lock(); /// /// Flag indicating whether the JS engine is initialized @@ -127,10 +132,10 @@ public VroomJsEngine(VroomSettings settings) catch (TypeInitializationException e) { Exception innerException = e.InnerException; - if (innerException != null) + if (innerException is not null) { var dllNotFoundException = innerException as DllNotFoundException; - if (dllNotFoundException != null) + if (dllNotFoundException is not null) { throw WrapDllNotFoundException(dllNotFoundException); } @@ -149,7 +154,7 @@ public VroomJsEngine(VroomSettings settings) } finally { - if (_jsContext == null) + if (_jsContext is null) { Dispose(); } @@ -221,7 +226,7 @@ private static WrapperException WrapJsException(OriginalException originalExcept { wrapperException = new WrapperException(message, EngineName, EngineVersion, originalException); } - else if (type == null && message.Equals(": at line: 0 column: 1.", StringComparison.Ordinal)) + else if (type is null && message.Equals(": at line: 0 column: 1.", StringComparison.Ordinal)) { wrapperException = new WrapperInterruptedException(CoreStrings.Runtime_ScriptInterrupted, EngineName, EngineVersion, originalException); @@ -592,7 +597,7 @@ private void InnerEmbedHostItem(string itemName, object value) try { var delegateValue = value as Delegate; - if (delegateValue != null) + if (delegateValue is not null) { _jsContext.SetFunction(itemName, delegateValue); } @@ -603,7 +608,7 @@ private void InnerEmbedHostItem(string itemName, object value) } catch (OriginalException e) { - if (oldValue != null) + if (oldValue is not null) { _hostItems[itemName] = oldValue; } @@ -664,13 +669,13 @@ public override void Dispose() { lock (_executionSynchronizer) { - if (_jsContext != null) + if (_jsContext is not null) { _jsContext.Dispose(); _jsContext = null; } - if (_jsEngine != null) + if (_jsEngine is not null) { _jsEngine.Dispose(); _jsEngine = null; diff --git a/src/JavaScriptEngineSwitcher.Vroom/readme.txt b/src/JavaScriptEngineSwitcher.Vroom/readme.txt index b37c965c..d40ac247 100644 --- a/src/JavaScriptEngineSwitcher.Vroom/readme.txt +++ b/src/JavaScriptEngineSwitcher.Vroom/readme.txt @@ -1,11 +1,11 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: Vroom v3.24.1 + README file for JS Engine Switcher: Vroom v3.31.0 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== @@ -19,6 +19,14 @@ Redistributable for Visual Studio 2012 and the Microsoft Visual C++ 2015 Redistributable. + ============= + RELEASE NOTES + ============= + 1. Performed a migration to the modern C# null/not-null checks; + 2. Added support for .NET 10; + 3. In the `lock` statements for .NET 10 target now uses a instances of the + `System.Threading.Lock` class. + ==================== POST-INSTALL ACTIONS ==================== diff --git a/src/JavaScriptEngineSwitcher.Yantra/Helpers/ReflectionHelpers.cs b/src/JavaScriptEngineSwitcher.Yantra/Helpers/ReflectionHelpers.cs index 58dcdffd..0ee413d0 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/Helpers/ReflectionHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Yantra/Helpers/ReflectionHelpers.cs @@ -23,7 +23,7 @@ public static void FixArgumentTypes(ref object[] argValues, ParameterInfo[] para } object argValue = argValues[argIndex]; - if (argValue == null) + if (argValue is null) { continue; } diff --git a/src/JavaScriptEngineSwitcher.Yantra/Helpers/YantraJsErrorHelpers.cs b/src/JavaScriptEngineSwitcher.Yantra/Helpers/YantraJsErrorHelpers.cs index cabb5f50..875ed1f7 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/Helpers/YantraJsErrorHelpers.cs +++ b/src/JavaScriptEngineSwitcher.Yantra/Helpers/YantraJsErrorHelpers.cs @@ -1,13 +1,8 @@ using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Text.RegularExpressions; -using JavaScriptEngineSwitcher.Core.Extensions; using JavaScriptEngineSwitcher.Core.Helpers; -using CoreStrings = JavaScriptEngineSwitcher.Core.Resources.Strings; - namespace JavaScriptEngineSwitcher.Yantra.Helpers { /// @@ -45,46 +40,27 @@ internal static class YantraJsErrorHelpers /// An array of instances public static ErrorLocationItem[] ParseErrorLocation(string errorLocation) { - if (string.IsNullOrWhiteSpace(errorLocation)) - { - return new ErrorLocationItem[0]; - } + return JsErrorHelpers.ParseErrorLocation(errorLocation, MapErrorLocationItem); + } - var errorLocationItems = new List(); - string[] lines = errorLocation.SplitToLines(); - int lineCount = lines.Length; + private static ErrorLocationItem MapErrorLocationItem(string errorLocationLine) + { + ErrorLocationItem item = null; + Match lineMatch = _errorLocationLineRegex.Match(errorLocationLine); - for (int lineIndex = 0; lineIndex < lineCount; lineIndex++) + if (lineMatch.Success) { - string line = lines[lineIndex]; - if (line.Length == 0) - { - continue; - } - - Match lineMatch = _errorLocationLineRegex.Match(line); - - if (lineMatch.Success) + GroupCollection lineGroups = lineMatch.Groups; + item = new ErrorLocationItem { - GroupCollection lineGroups = lineMatch.Groups; - - var errorLocationItem = new ErrorLocationItem - { - FunctionName = lineGroups["functionName"].Value, - DocumentName = lineGroups["documentName"].Value, - LineNumber = int.Parse(lineGroups["lineNumber"].Value), - ColumnNumber = int.Parse(lineGroups["columnNumber"].Value) - }; - errorLocationItems.Add(errorLocationItem); - } - else - { - Debug.WriteLine(string.Format(CoreStrings.Runtime_InvalidErrorLocationLineFormat, line)); - return new ErrorLocationItem[0]; - } + FunctionName = lineGroups["functionName"].Value, + DocumentName = lineGroups["documentName"].Value, + LineNumber = int.Parse(lineGroups["lineNumber"].Value), + ColumnNumber = int.Parse(lineGroups["columnNumber"].Value) + }; } - return errorLocationItems.ToArray(); + return item; } /// diff --git a/src/JavaScriptEngineSwitcher.Yantra/JavaScriptEngineSwitcher.Yantra.csproj b/src/JavaScriptEngineSwitcher.Yantra/JavaScriptEngineSwitcher.Yantra.csproj index 5e5790ce..278ede77 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/JavaScriptEngineSwitcher.Yantra.csproj +++ b/src/JavaScriptEngineSwitcher.Yantra/JavaScriptEngineSwitcher.Yantra.csproj @@ -2,11 +2,12 @@ JS Engine Switcher: Yantra - 3.25.0 - netstandard2.0;netstandard2.1 + 3.33.1 + netstandard2.0;netstandard2.1;net8.0;net10.0 Library true $(NoWarn);CS1591 + false true @@ -18,11 +19,11 @@ ../../Icons/JavaScriptEngineSwitcher_Yantra_Logo128x128.png JavaScriptEngineSwitcher.Yantra contains a `YantraJsEngine` adapter (wrapper for the YantraJS). $(PackageCommonTags);Yantra;YantraJS - YantraJS was updated to version 1.2.209. + YantraJS was updated to version 1.2.314. - + diff --git a/src/JavaScriptEngineSwitcher.Yantra/JsEngineFactoryCollectionExtensions.cs b/src/JavaScriptEngineSwitcher.Yantra/JsEngineFactoryCollectionExtensions.cs index 8cb96eae..5cf7213c 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/JsEngineFactoryCollectionExtensions.cs +++ b/src/JavaScriptEngineSwitcher.Yantra/JsEngineFactoryCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class JsEngineFactoryCollectionExtensions /// Instance of public static JsEngineFactoryCollection AddYantra(this JsEngineFactoryCollection source) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } @@ -35,12 +35,12 @@ public static JsEngineFactoryCollection AddYantra(this JsEngineFactoryCollection public static JsEngineFactoryCollection AddYantra(this JsEngineFactoryCollection source, Action configure) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (configure == null) + if (configure is null) { throw new ArgumentNullException(nameof(configure)); } @@ -60,12 +60,12 @@ public static JsEngineFactoryCollection AddYantra(this JsEngineFactoryCollection /// Instance of public static JsEngineFactoryCollection AddYantra(this JsEngineFactoryCollection source, YantraSettings settings) { - if (source == null) + if (source is null) { throw new ArgumentNullException(nameof(source)); } - if (settings == null) + if (settings is null) { throw new ArgumentNullException(nameof(settings)); } diff --git a/src/JavaScriptEngineSwitcher.Yantra/PACKAGE-DESCRIPTION.md b/src/JavaScriptEngineSwitcher.Yantra/PACKAGE-DESCRIPTION.md index 2b25a317..c344c803 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/PACKAGE-DESCRIPTION.md +++ b/src/JavaScriptEngineSwitcher.Yantra/PACKAGE-DESCRIPTION.md @@ -1 +1 @@ -JavaScriptEngineSwitcher.Yantra contains a `YantraJsEngine` adapter (wrapper for the [YantraJS](https://yantrajs.com) version 1.2.209). \ No newline at end of file +JavaScriptEngineSwitcher.Yantra contains a `YantraJsEngine` adapter (wrapper for the [YantraJS](https://github.com/yantrajs/yantra) version 1.2.314). \ No newline at end of file diff --git a/src/JavaScriptEngineSwitcher.Yantra/YantraJsEngine.cs b/src/JavaScriptEngineSwitcher.Yantra/YantraJsEngine.cs index fa870597..f90c8076 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/YantraJsEngine.cs +++ b/src/JavaScriptEngineSwitcher.Yantra/YantraJsEngine.cs @@ -3,6 +3,11 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; +#if NET10_0_OR_GREATER +using Lock = System.Threading.Lock; +#else +using Lock = System.Object; +#endif using YantraJS.Core; @@ -12,6 +17,7 @@ using OriginalClrType = YantraJS.Core.Clr.ClrType; using OriginalContext = YantraJS.Core.JSContext; using OriginalDate = YantraJS.Core.JSDate; +using OriginalError = YantraJS.Core.JSError; using OriginalException = YantraJS.Core.JSException; using OriginalFunction = YantraJS.Core.JSFunction; using OriginalJsonObject = YantraJS.Core.JSJSON; @@ -21,6 +27,7 @@ using JavaScriptEngineSwitcher.Core; using JavaScriptEngineSwitcher.Core.Constants; +using JavaScriptEngineSwitcher.Core.Extensions; using JavaScriptEngineSwitcher.Core.Helpers; using JavaScriptEngineSwitcher.Core.Utilities; @@ -47,7 +54,7 @@ public sealed class YantraJsEngine : JsEngineBase /// /// Version of original JS engine /// - private const string EngineVersion = "1.2.209"; + private const string EngineVersion = "1.2.314"; /// /// Regular expression for working with the error message @@ -69,7 +76,7 @@ public sealed class YantraJsEngine : JsEngineBase /// /// Synchronizer of code execution /// - private readonly object _executionSynchronizer = new object(); + private readonly Lock _executionSynchronizer = new Lock(); /// /// Unique document name manager @@ -102,7 +109,7 @@ public YantraJsEngine(YantraSettings settings) Debugger = yantraSettings.Debugger }; - if (_consoleCallback != null) + if (_consoleCallback is not null) { _jsContext.ConsoleEvent += OnConsoleWrite; } @@ -255,7 +262,7 @@ private static OriginalFunction CreateEmbeddedFunction(Delegate del) result = del.DynamicInvoke(processedArgs); } catch (Exception e) when ((e is TargetInvocationException || e is WrapperException) - && e.InnerException != null) + && e.InnerException is not null) { OriginalException originalException = OriginalException.From(e.InnerException); throw originalException; @@ -279,7 +286,7 @@ private static object[] GetHostDelegateArguments(in OriginalArguments args, int int argCount = args.Length; if (argCount == 0) { - return new object[0]; + return []; } int processedArgCount = Math.Min(argCount, maxArgCount); @@ -305,11 +312,11 @@ private WrapperException WrapJsException(OriginalException originalException) int columnNumber = 0; ErrorLocationItem[] callStackItems = null; - OriginalValue errorValue = originalException.Error; - if (errorValue != null) + var errorValue = originalException.Error as OriginalError; + if (errorValue is not null) { - message = errorValue.ToString(); - Match messageMatch = _errorMessageRegex.Match(message); + string messageWithType = errorValue.ToString(); + Match messageMatch = _errorMessageRegex.Match(messageWithType); if (messageMatch.Success) { @@ -322,7 +329,12 @@ private WrapperException WrapJsException(OriginalException originalException) int.Parse(messageGroups["columnNumber"].Value) : 0; } - string rawCallStack = errorValue["stack"].AsStringOrDefault(); + string messageWithCallStack = type == JsErrorType.Syntax ? + originalException.JSStackTrace.AsStringOrDefault() + : + errorValue.Stack ?? errorValue["stack"].AsStringOrDefault() + ; + string rawCallStack = GetRawCallStack(message, messageWithType, messageWithCallStack); callStackItems = YantraJsErrorHelpers.ParseErrorLocation(rawCallStack); callStackItems = YantraJsErrorHelpers.FilterErrorLocationItems(callStackItems); @@ -354,7 +366,7 @@ private WrapperException WrapJsException(OriginalException originalException) } else { - string callStack = callStackItems != null ? + string callStack = callStackItems is not null ? JsErrorHelpers.StringifyErrorLocationItems(callStackItems) : string.Empty; message = JsErrorHelpers.GenerateScriptErrorMessage(type, description, callStack); @@ -381,6 +393,14 @@ private WrapperException WrapJsException(OriginalException originalException) return wrapperException; } + private static string GetRawCallStack(string message, string messageWithType, string messageWithCallStack) + { + string baseMessage = messageWithCallStack.StartsWith(messageWithType) ? messageWithType : message; + string rawCallStack = JsErrorHelpers.GetErrorLocationFromMessage(messageWithCallStack, baseMessage); + + return rawCallStack; + } + private void OnConsoleWrite(OriginalContext context, string type, in OriginalArguments args) { int argCount = args.Length; @@ -444,7 +464,7 @@ private OriginalValue InnerEvaluateWithoutResultConversion(string expression, st throw WrapJsException(e); } catch (Exception e) when ((e is TargetInvocationException || e is WrapperException) - && e.InnerException != null) + && e.InnerException is not null) { OriginalException originalException = OriginalException.From(e.InnerException); throw originalException; @@ -477,7 +497,7 @@ private OriginalValue InnerCallFunctionWithoutResultConversion(string functionNa throw WrapJsException(e); } catch (Exception e) when ((e is TargetInvocationException || e is WrapperException) - && e.InnerException != null) + && e.InnerException is not null) { OriginalException originalException = OriginalException.From(e.InnerException); throw originalException; @@ -570,7 +590,7 @@ protected override void InnerExecute(string code, string documentName) throw WrapJsException(e); } catch (Exception e) when ((e is TargetInvocationException || e is WrapperException) - && e.InnerException != null) + && e.InnerException is not null) { OriginalException originalException = OriginalException.From(e.InnerException); throw originalException; @@ -759,9 +779,9 @@ public override void Dispose() { lock (_executionSynchronizer) { - if (_jsContext != null) + if (_jsContext is not null) { - if (_consoleCallback != null) + if (_consoleCallback is not null) { _jsContext.ConsoleEvent -= OnConsoleWrite; _consoleCallback = null; diff --git a/src/JavaScriptEngineSwitcher.Yantra/readme.txt b/src/JavaScriptEngineSwitcher.Yantra/readme.txt index 238e47de..364b2bf5 100644 --- a/src/JavaScriptEngineSwitcher.Yantra/readme.txt +++ b/src/JavaScriptEngineSwitcher.Yantra/readme.txt @@ -1,23 +1,23 @@  -------------------------------------------------------------------------------- - README file for JS Engine Switcher: Yantra v3.25.0 + README file for JS Engine Switcher: Yantra v3.33.1 -------------------------------------------------------------------------------- - Copyright (c) 2013-2024 Andrey Taritsyn - http://www.taritsyn.ru + Copyright (c) 2013-2026 Andrey Taritsyn - http://www.taritsyn.ru =========== DESCRIPTION =========== JavaScriptEngineSwitcher.Yantra contains a `YantraJsEngine` adapter (wrapper for the - YantraJS (https://yantrajs.com) version 1.2.209). + YantraJS (https://github.com/yantrajs/yantra) version 1.2.314). ============= RELEASE NOTES ============= - YantraJS was updated to version 1.2.209. + YantraJS was updated to version 1.2.314. ============= DOCUMENTATION diff --git a/test/JavaScriptEngineSwitcher.Benchmarks/Assert.cs b/test/JavaScriptEngineSwitcher.Benchmarks/Assert.cs index 2ccd4123..a9ef4f68 100644 --- a/test/JavaScriptEngineSwitcher.Benchmarks/Assert.cs +++ b/test/JavaScriptEngineSwitcher.Benchmarks/Assert.cs @@ -6,7 +6,7 @@ namespace JavaScriptEngineSwitcher.Benchmarks { internal static class Assert { - private static readonly char[] _lineBreakChars = new[] { '\r', '\n' }; + private static readonly char[] _lineBreakChars = ['\r', '\n']; public static void Equal(string expected, string actual, bool ignoreLineBreaks = false) @@ -37,7 +37,7 @@ private static bool EqualInternal(string a, string b, bool ignoreLineBreaks) return true; } - if (a == null || b == null) + if (a is null || b is null) { return false; } diff --git a/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj b/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj index 72815599..0efbcea6 100644 --- a/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj +++ b/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj @@ -2,8 +2,8 @@ JS Engine Switcher: Benchmarks - 3.26.0 - net462;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0 + 3.33.1 + net462;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 Exe AnyCPU true @@ -16,7 +16,7 @@ - + diff --git a/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionHeavyBenchmark.cs b/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionHeavyBenchmark.cs index a3225779..af8f6bda 100644 --- a/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionHeavyBenchmark.cs +++ b/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionHeavyBenchmark.cs @@ -40,12 +40,12 @@ public class JsExecutionHeavyBenchmark /// /// List of items /// - private static ContentItem[] _contentItems = new[] { + private static ContentItem[] _contentItems = [ new ContentItem("hello-world"), new ContentItem("contacts"), new ContentItem("js-engines"), new ContentItem("web-browser-family-tree") - }; + ]; /// diff --git a/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionLightBenchmark.cs b/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionLightBenchmark.cs index d352072a..40d9e1ef 100644 --- a/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionLightBenchmark.cs +++ b/test/JavaScriptEngineSwitcher.Benchmarks/JsExecutionLightBenchmark.cs @@ -74,13 +74,13 @@ public static void PopulateTestData() { _libraryCode = Utils.GetResourceAsString( $"Resources.{LibraryFileName}", typeof(JsExecutionLightBenchmark)); - _inputTypes = new string[ItemCount] - { + _inputTypes = + [ "basic", "letters-numbers", "gost-16876-71", "gost-7-79-2000", "police", "foreign-passport", "yandex-friendly-url" - }; - _inputStrings = new string[ItemCount] - { + ]; + _inputStrings = + [ "SOLID — мнемонический акроним, введённый Майклом Фэзерсом для первых пяти принципов, названных " + "Робертом Мартином в начале 2000-х, которые означали пять основных принципов объектно-ориентированного " + "программирования и проектирования.", @@ -101,9 +101,9 @@ public static void PopulateTestData() "«Зависимость на Абстракциях. Нет зависимости на что-то конкретное.»", "SOLID (объектно-ориентированное программирование)" - }; - _targetOutputStrings = new string[ItemCount] - { + ]; + _targetOutputStrings = + [ "SOLID — mnemonicheskij akronim, vvedjonnyj Majklom Fjezersom dlja pervyh pjati principov, nazvannyh " + "Robertom Martinom v nachale 2000-h, kotorye oznachali pjat' osnovnyh principov ob#ektno-orientirovannogo " + "programmirovanija i proektirovanija.", @@ -126,7 +126,7 @@ public static void PopulateTestData() "«Zavisimost na Abstraktciiakh. Net zavisimosti na chto-to konkretnoe.»", "solid-obektno-orientirovannoe-programmirovanie" - }; + ]; } /// diff --git a/test/JavaScriptEngineSwitcher.Tests/Es5TestsBase.cs b/test/JavaScriptEngineSwitcher.Tests/Es5TestsBase.cs index affe97f7..bf1106be 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Es5TestsBase.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Es5TestsBase.cs @@ -353,13 +353,14 @@ public virtual void SupportsDateNowMethod() { // Arrange const string input = "Date.now();"; - DateTime targetOutput = DateTime.Now.ToUniversalTime(); + DateTime targetOutput; // Act DateTime output; using (var jsEngine = CreateJsEngine()) { + targetOutput = DateTime.Now.ToUniversalTime(); output = new DateTime(1970, 01, 01).AddMilliseconds(jsEngine.Evaluate(input)); } diff --git a/test/JavaScriptEngineSwitcher.Tests/GlobalUsings.cs b/test/JavaScriptEngineSwitcher.Tests/GlobalUsings.cs new file mode 100644 index 00000000..70bfca9c --- /dev/null +++ b/test/JavaScriptEngineSwitcher.Tests/GlobalUsings.cs @@ -0,0 +1,5 @@ +#if NET10_0_OR_GREATER +global using Lock = System.Threading.Lock; +#else +global using Lock = System.Object; +#endif \ No newline at end of file diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/Age.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/Age.cs new file mode 100644 index 00000000..03ebd86e --- /dev/null +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/Age.cs @@ -0,0 +1,23 @@ +using System; + +namespace JavaScriptEngineSwitcher.Tests.Interop +{ + public struct Age + { + public readonly int Year; + + + public Age(int year) + { + Year = year; + } + + + public override string ToString() + { + int age = DateTime.Now.Year - Year; + + return age.ToString(); + } + } +} \ No newline at end of file diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/BundleTable.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/BundleTable.cs index b9e477dd..ae851bbc 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Interop/BundleTable.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/BundleTable.cs @@ -4,7 +4,7 @@ public static class BundleTable { private static bool _enableOptimizations = true; - public static object SyncRoot = new object(); + public static readonly Lock SyncRoot = new Lock(); public static bool EnableOptimizations { diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/Date.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/Date.cs index ae1cda1b..81fbe281 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Interop/Date.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/Date.cs @@ -4,8 +4,8 @@ namespace JavaScriptEngineSwitcher.Tests.Interop { public struct Date { - private static readonly int[] _cumulativeDays = { 0, 31, 59, 90, 120, 151, 181, - 212, 243, 273, 304, 334 }; + private static readonly int[] _cumulativeDays = [0, 31, 59, 90, 120, 151, 181, + 212, 243, 273, 304, 334]; public int Year; public int Month; diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/FileManager.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/FileManager.cs index 6b288e72..614f65e8 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Interop/FileManager.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/FileManager.cs @@ -13,7 +13,7 @@ public string ReadFile(string path) public string ReadFile(string path, Encoding encoding) { - if (path == null) + if (path is null) { throw new ArgumentNullException("path"); } diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/Logging/DefaultLogger.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/Logging/DefaultLogger.cs index b4c8fdeb..7eb9c6bb 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Interop/Logging/DefaultLogger.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/Logging/DefaultLogger.cs @@ -2,7 +2,8 @@ { public class DefaultLogger { - public static object SyncRoot = new object(); + public static readonly Lock SyncRoot = new Lock(); + public static ILogger Current = new NullLogger(); } } \ No newline at end of file diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/LoginFailedException.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/LoginFailedException.cs index 52bea289..2ecd7ebd 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Interop/LoginFailedException.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/LoginFailedException.cs @@ -1,7 +1,5 @@ using System; -#if !NET8_0_OR_GREATER using System.Runtime.Serialization; -#endif namespace JavaScriptEngineSwitcher.Tests.Interop { @@ -27,21 +25,26 @@ public LoginFailedException(string message) public LoginFailedException(string message, Exception innerException) : base(message, innerException) { } -#if !NET8_0_OR_GREATER +#if NET8_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif protected LoginFailedException(SerializationInfo info, StreamingContext context) : base(info, context) { - if (info != null) + if (info is not null) { _userName = info.GetString("UserName"); } } +#if NET8_0_OR_GREATER + [Obsolete(DiagnosticId = "SYSLIB0051")] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info == null) + if (info is null) { throw new ArgumentNullException(nameof(info)); } @@ -49,6 +52,5 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont base.GetObjectData(info, context); info.AddValue("UserName", this._userName); } -#endif } } \ No newline at end of file diff --git a/test/JavaScriptEngineSwitcher.Tests/Interop/RuntimeConstants.cs b/test/JavaScriptEngineSwitcher.Tests/Interop/RuntimeConstants.cs new file mode 100644 index 00000000..64f8f599 --- /dev/null +++ b/test/JavaScriptEngineSwitcher.Tests/Interop/RuntimeConstants.cs @@ -0,0 +1,11 @@ +namespace JavaScriptEngineSwitcher.Tests.Interop +{ + public static class RuntimeConstants + { + public static readonly Lock SyncRoot = new Lock(); + + + public static readonly int MinValue = 0; + public static readonly int MaxValue = 999; + } +} \ No newline at end of file diff --git a/test/JavaScriptEngineSwitcher.Tests/InteropTestsBase.cs b/test/JavaScriptEngineSwitcher.Tests/InteropTestsBase.cs index 978533a6..0e4f47ba 100644 --- a/test/JavaScriptEngineSwitcher.Tests/InteropTestsBase.cs +++ b/test/JavaScriptEngineSwitcher.Tests/InteropTestsBase.cs @@ -59,6 +59,31 @@ public virtual void EmbeddingOfInstanceOfCustomValueTypeWithFields() Assert.Equal(targetOutput3, output3); } + [Fact] + public virtual void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { + // Arrange + var age = new Age(1979); + const string updateCode = "age.Year = 1982;"; + + const string input = "age.Year"; + const int targetOutput = 1979; + + // Act + int output; + + using (var jsEngine = CreateJsEngine()) + { + jsEngine.EmbedHostObject("age", age); + jsEngine.Execute(updateCode); + + output = jsEngine.Evaluate(input); + } + + // Assert + Assert.Equal(targetOutput, output); + } + [Fact] public virtual void EmbeddingOfInstanceOfCustomReferenceTypeWithFields() { @@ -1174,6 +1199,47 @@ public virtual void EmbeddingOfCustomReferenceTypeWithField() Assert.Equal(targetOutput, output); } + [Fact] + public virtual void EmbeddingOfCustomReferenceTypeWithReadonlyFields() + { + // Arrange + Type runtimeConstantsType = typeof(RuntimeConstants); + const string updateCode = @"var oldMinValue = RuntimeConstants.MinValue; +var oldMaxValue = RuntimeConstants.MaxValue; + +RuntimeConstants.MinValue = 1; +RuntimeConstants.MaxValue = 100;"; + const string rollbackCode = @"RuntimeConstants.MinValue = oldMinValue; +RuntimeConstants.MaxValue = oldMaxValue;"; + + const string input1 = "RuntimeConstants.MinValue"; + const int targetOutput1 = 0; + + const string input2 = "RuntimeConstants.MaxValue"; + const int targetOutput2 = 999; + + // Act + int output1; + int output2; + + using (var jsEngine = CreateJsEngine()) + { + jsEngine.EmbedHostType("RuntimeConstants", runtimeConstantsType); + + lock (RuntimeConstants.SyncRoot) + { + jsEngine.Execute(updateCode); + output1 = jsEngine.Evaluate(input1); + output2 = jsEngine.Evaluate(input2); + jsEngine.Execute(rollbackCode); + } + } + + // Assert + Assert.Equal(targetOutput1, output1); + Assert.Equal(targetOutput2, output2); + } + #endregion #region Types with properties @@ -1207,7 +1273,7 @@ public virtual void EmbeddingOfBuiltinReferenceTypeWithProperty() Type environmentType = typeof(Environment); const string input = "Environment.NewLine"; - string[] targetOutput = { "\r", "\r\n", "\n", "\n\r" }; + string[] targetOutput = ["\r", "\r\n", "\n", "\n\r"]; // Act string output; diff --git a/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj b/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj index a1abbf5a..48df345b 100644 --- a/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj +++ b/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj @@ -2,13 +2,14 @@ JS Engine Switcher: Tests - 3.26.0 - net462;net471;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0 + 3.33.1 + net462;net471;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 Library latest true true true + false true false @@ -16,8 +17,8 @@ - - + + @@ -42,32 +43,12 @@ - - - - - - - - - - - - - - - - - - - - - + diff --git a/test/JavaScriptEngineSwitcher.Tests/Jint/CommonTests.cs b/test/JavaScriptEngineSwitcher.Tests/Jint/CommonTests.cs index 97b9e79e..a842ea58 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Jint/CommonTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Jint/CommonTests.cs @@ -47,7 +47,7 @@ public void MappingCompilationErrorDuringEvaluationOfExpression() // Assert Assert.NotNull(exception); Assert.Equal("Compilation error", exception.Category); - Assert.Equal("Unexpected token @", exception.Description); + Assert.Equal("Unexpected token '@'", exception.Description); Assert.Equal("SyntaxError", exception.Type); Assert.Equal("variables.js", exception.DocumentName); Assert.Equal(3, exception.LineNumber); @@ -126,7 +126,7 @@ public void MappingCompilationErrorDuringExecutionOfCode() // Assert Assert.NotNull(exception); Assert.Equal("Compilation error", exception.Category); - Assert.Equal("Unexpected token )", exception.Description); + Assert.Equal("Unexpected token ')'", exception.Description); Assert.Equal("SyntaxError", exception.Type); Assert.Equal("factorial.js", exception.DocumentName); Assert.Equal(10, exception.LineNumber); @@ -250,7 +250,7 @@ public void MappingRuntimeErrorDuringArraySizeExceeded() } [Fact] - public void MappingRuntimeErrorDuringMaxJsonParseDepthReached() + public void MappingCompilationErrorDuringMaxJsonParseDepthReached() { // Arrange const string input = @"var data = '{\n' + @@ -270,7 +270,7 @@ public void MappingRuntimeErrorDuringMaxJsonParseDepthReached() JSON.parse(data);"; - JsRuntimeException exception = null; + JsCompilationException exception = null; // Act using (var jsEngine = new JintJsEngine( @@ -284,7 +284,7 @@ public void MappingRuntimeErrorDuringMaxJsonParseDepthReached() { jsEngine.Execute(input, "menu.js"); } - catch (JsRuntimeException e) + catch (JsCompilationException e) { exception = e; } @@ -292,18 +292,13 @@ public void MappingRuntimeErrorDuringMaxJsonParseDepthReached() // Assert Assert.NotNull(exception); - Assert.Equal("Runtime error", exception.Category); + Assert.Equal("Compilation error", exception.Category); Assert.Equal("Max. depth level of JSON reached at position 82", exception.Description); Assert.Equal("SyntaxError", exception.Type); Assert.Equal("menu.js", exception.DocumentName); Assert.Equal(16, exception.LineNumber); Assert.Equal(1, exception.ColumnNumber); Assert.Empty(exception.SourceFragment); - Assert.Equal( - " at Global code (parse menu.js:16:12)" + Environment.NewLine + - " at Global code (menu.js:16:1)", - exception.CallStack - ); } [Fact] @@ -499,7 +494,7 @@ public void GenerationOfCompilationErrorMessage() const string input = @"var arr = []; var obj = {}; var foo = 'Browser's bar';"; - string targetOutput = "SyntaxError: Unexpected identifier" + Environment.NewLine + + string targetOutput = "SyntaxError: Unexpected identifier 's'" + Environment.NewLine + " at variables.js:3:20" ; diff --git a/test/JavaScriptEngineSwitcher.Tests/Jint/InteropTests.cs b/test/JavaScriptEngineSwitcher.Tests/Jint/InteropTests.cs index 9b39653c..b95c8d3a 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Jint/InteropTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Jint/InteropTests.cs @@ -32,6 +32,35 @@ private IJsEngine CreateJsEngine(bool allowReflection) #region Embedding of objects + #region Objects with fields + + [Fact] + public override void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { + // Arrange + var age = new Age(1979); + const string updateCode = "age.Year = 1982;"; + + const string input = "age.Year"; + const int targetOutput = 1982; + + // Act + int output; + + using (var jsEngine = CreateJsEngine()) + { + jsEngine.EmbedHostObject("age", age); + jsEngine.Execute(updateCode); + + output = jsEngine.Evaluate(input); + } + + // Assert + Assert.Equal(targetOutput, output); + } + + #endregion + #region Objects with methods [Fact] @@ -188,7 +217,7 @@ public void MappingCompilationErrorDuringRecursiveEvaluationOfFiles() // Assert Assert.NotNull(exception); Assert.Equal("Compilation error", exception.Category); - Assert.Equal("Unexpected token ,", exception.Description); + Assert.Equal("Unexpected token ','", exception.Description); Assert.Equal("SyntaxError", exception.Type); Assert.Equal("math.js", exception.DocumentName); Assert.Equal(25, exception.LineNumber); @@ -311,11 +340,11 @@ public void MappingCompilationErrorDuringRecursiveExecutionOfFiles() // Assert Assert.NotNull(exception); Assert.Equal("Compilation error", exception.Category); - Assert.Equal("Unexpected number", exception.Description); + Assert.Equal("Invalid or unexpected token", exception.Description); Assert.Equal("SyntaxError", exception.Type); Assert.Equal("second-file.js", exception.DocumentName); Assert.Equal(1, exception.LineNumber); - Assert.Equal(8, exception.ColumnNumber); + Assert.Equal(6, exception.ColumnNumber); Assert.Empty(exception.SourceFragment); } diff --git a/test/JavaScriptEngineSwitcher.Tests/Jint/PrecompilationTests.cs b/test/JavaScriptEngineSwitcher.Tests/Jint/PrecompilationTests.cs index 0597c4ec..0e5a512e 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Jint/PrecompilationTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Jint/PrecompilationTests.cs @@ -55,11 +55,11 @@ function s4() { Assert.Null(precompiledScript); Assert.NotNull(exception); Assert.Equal("Compilation error", exception.Category); - Assert.Equal("Unexpected token }", exception.Description); + Assert.Equal("Unexpected token ';'", exception.Description); Assert.Equal("SyntaxError", exception.Type); Assert.Equal("guid.js", exception.DocumentName); - Assert.Equal(7, exception.LineNumber); - Assert.Equal(2, exception.ColumnNumber); + Assert.Equal(6, exception.LineNumber); + Assert.Equal(4, exception.ColumnNumber); Assert.Empty(exception.SourceFragment); } @@ -134,7 +134,7 @@ public void GenerationOfCompilationErrorMessage() return result; }"; - string targetOutput = "SyntaxError: Unexpected token }" + Environment.NewLine + + string targetOutput = "SyntaxError: Unexpected token '}'" + Environment.NewLine + " at make-id.js:12:1" ; diff --git a/test/JavaScriptEngineSwitcher.Tests/Jurassic/InteropTests.cs b/test/JavaScriptEngineSwitcher.Tests/Jurassic/InteropTests.cs index 0250db5d..6739bf63 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Jurassic/InteropTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Jurassic/InteropTests.cs @@ -2,6 +2,8 @@ using Xunit; +using JavaScriptEngineSwitcher.Tests.Interop; + namespace JavaScriptEngineSwitcher.Tests.Jurassic { public class InteropTests : InteropTestsBase @@ -13,6 +15,34 @@ protected override string EngineName #region Embedding of objects + #region Objects with fields + + public override void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { + // Arrange + var age = new Age(1979); + const string updateCode = "age.Year = 1982;"; + + const string input = "age.Year"; + const int targetOutput = 1982; + + // Act + int output; + + using (var jsEngine = CreateJsEngine()) + { + jsEngine.EmbedHostObject("age", age); + jsEngine.Execute(updateCode); + + output = jsEngine.Evaluate(input); + } + + // Assert + Assert.Equal(targetOutput, output); + } + + #endregion + #region Objects with properties public override void EmbeddingOfInstanceOfAnonymousTypeWithProperties() diff --git a/test/JavaScriptEngineSwitcher.Tests/NiL/InteropTests.cs b/test/JavaScriptEngineSwitcher.Tests/NiL/InteropTests.cs index 304db66e..0c85a7b8 100644 --- a/test/JavaScriptEngineSwitcher.Tests/NiL/InteropTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/NiL/InteropTests.cs @@ -19,6 +19,35 @@ protected override string EngineName #region Embedding of objects + #region Objects with fields + + [Fact] + public override void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { + // Arrange + var age = new Age(1979); + const string updateCode = "age.Year = 1982;"; + + const string input = "age.Year"; + const int targetOutput = 1982; + + // Act + int output; + + using (var jsEngine = CreateJsEngine()) + { + jsEngine.EmbedHostObject("age", age); + jsEngine.Execute(updateCode); + + output = jsEngine.Evaluate(input); + } + + // Assert + Assert.Equal(targetOutput, output); + } + + #endregion + #region Objects with methods [Fact] diff --git a/test/JavaScriptEngineSwitcher.Tests/PrecompilationTestsBase.cs b/test/JavaScriptEngineSwitcher.Tests/PrecompilationTestsBase.cs index 4ca5aac9..1576d36b 100644 --- a/test/JavaScriptEngineSwitcher.Tests/PrecompilationTestsBase.cs +++ b/test/JavaScriptEngineSwitcher.Tests/PrecompilationTestsBase.cs @@ -41,8 +41,8 @@ function declinationOfSeconds(number) { const string functionName = "declinationOfSeconds"; const int itemCount = 4; - int[] inputSeconds = new int[itemCount] { 0, 1, 42, 600 }; - string[] targetOutputStrings = new string[itemCount] { "секунд", "секунда", "секунды", "секунд" }; + int[] inputSeconds = [0, 1, 42, 600]; + string[] targetOutputStrings = ["секунд", "секунда", "секунды", "секунд"]; string[] outputStrings = new string[itemCount]; // Act @@ -91,8 +91,8 @@ public virtual void ExecutionOfPrecompiledFile() const string functionName = "declinationOfMinutes"; const int itemCount = 4; - int[] inputMinutes = new int[itemCount] { 0, 1, 22, 88 }; - string[] targetOutputStrings = new string[itemCount] { "минут", "минута", "минуты", "минут" }; + int[] inputMinutes = [0, 1, 22, 88]; + string[] targetOutputStrings = ["минут", "минута", "минуты", "минут"]; string[] outputStrings = new string[itemCount]; // Act @@ -141,8 +141,8 @@ public virtual void ExecutionOfPrecompiledResourceByNameAndType() const string functionName = "declinationOfHours"; const int itemCount = 4; - int[] inputHours = new int[itemCount] { 0, 1, 24, 48 }; - string[] targetOutputStrings = new string[itemCount] { "часов", "час", "часа", "часов" }; + int[] inputHours = [0, 1, 24, 48]; + string[] targetOutputStrings = ["часов", "час", "часа", "часов"]; string[] outputStrings = new string[itemCount]; // Act @@ -191,8 +191,8 @@ public virtual void ExecutionOfPrecompiledResourceByNameAndAssembly() const string functionName = "declinationOfDays"; const int itemCount = 4; - int[] inputDays = new int[itemCount] { 0, 1, 3, 80 }; - string[] targetOutputStrings = new string[itemCount] { "дней", "день", "дня", "дней" }; + int[] inputDays = [0, 1, 3, 80]; + string[] targetOutputStrings = ["дней", "день", "дня", "дней"]; string[] outputStrings = new string[itemCount]; // Act diff --git a/test/JavaScriptEngineSwitcher.Tests/V8/CommonTests.cs b/test/JavaScriptEngineSwitcher.Tests/V8/CommonTests.cs index abc8712c..e1453c02 100644 --- a/test/JavaScriptEngineSwitcher.Tests/V8/CommonTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/V8/CommonTests.cs @@ -181,7 +181,6 @@ public void MappingRuntimeErrorDuringExecutionOfCode() ); } - /* [Fact] public void MappingRuntimeErrorDuringOutOfMemory() { @@ -217,7 +216,6 @@ public void MappingRuntimeErrorDuringOutOfMemory() Assert.Equal("Runtime error", exception.Category); Assert.Equal("The V8 runtime has exceeded its memory limit", exception.Description); } - */ #endregion diff --git a/test/JavaScriptEngineSwitcher.Tests/V8/InteropTests.cs b/test/JavaScriptEngineSwitcher.Tests/V8/InteropTests.cs index ded468d7..da1d8a9b 100644 --- a/test/JavaScriptEngineSwitcher.Tests/V8/InteropTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/V8/InteropTests.cs @@ -31,6 +31,38 @@ private IJsEngine CreateJsEngine(bool allowReflection) #region Embedding of objects + #region Objects with fields + + public override void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { + // Arrange + var age = new Age(1979); + const string updateCode = "age.Year = 1982;"; + + // Act + JsRuntimeException exception = null; + + using (var jsEngine = CreateJsEngine()) + { + try + { + jsEngine.EmbedHostObject("age", age); + jsEngine.Execute(updateCode); + } + catch (JsRuntimeException e) + { + exception = e; + } + } + + // Assert + Assert.NotNull(exception); + Assert.Equal("Runtime error", exception.Category); + Assert.Equal("The field is read-only", exception.Description); + } + + #endregion + #region Objects with methods public override void EmbeddingOfInstanceOfCustomValueTypeAndCallingOfItsGetTypeMethod() @@ -182,6 +214,43 @@ string TestAllowReflectionSetting(bool allowReflection) #endregion + #region Types with fields + + public override void EmbeddingOfCustomReferenceTypeWithReadonlyFields() + { + // Arrange + Type runtimeConstantsType = typeof(RuntimeConstants); + const string updateCode = @"RuntimeConstants.MinValue = 1; +RuntimeConstants.MaxValue = 100;"; + + // Act + JsRuntimeException exception = null; + + using (var jsEngine = CreateJsEngine()) + { + try + { + jsEngine.EmbedHostType("RuntimeConstants", runtimeConstantsType); + + lock (RuntimeConstants.SyncRoot) + { + jsEngine.Execute(updateCode); + } + } + catch (JsRuntimeException e) + { + exception = e; + } + } + + // Assert + Assert.NotNull(exception); + Assert.Equal("Runtime error", exception.Category); + Assert.Equal("The field is read-only", exception.Description); + } + + #endregion + #region Types with methods public override void EmbeddingOfTypeAndCallingOfItsGetTypeMethod() diff --git a/test/JavaScriptEngineSwitcher.Tests/Vroom/InteropTests.cs b/test/JavaScriptEngineSwitcher.Tests/Vroom/InteropTests.cs index 5cc43336..a2199686 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Vroom/InteropTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Vroom/InteropTests.cs @@ -15,6 +15,9 @@ protected override string EngineName public override void EmbeddingOfInstanceOfCustomValueTypeWithFields() { } + public override void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { } + public override void EmbeddingOfInstanceOfCustomReferenceTypeWithFields() { } @@ -84,6 +87,9 @@ public override void EmbeddingOfBuiltinValueTypeWithField() public override void EmbeddingOfCustomReferenceTypeWithField() { } + public override void EmbeddingOfCustomReferenceTypeWithReadonlyFields() + { } + #endregion #region Types with methods diff --git a/test/JavaScriptEngineSwitcher.Tests/Yantra/ConsoleTests.cs b/test/JavaScriptEngineSwitcher.Tests/Yantra/ConsoleTests.cs index 0a6ccdd7..d4eb19fb 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Yantra/ConsoleTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Yantra/ConsoleTests.cs @@ -201,7 +201,7 @@ public void Log(string type, object[] args) object arg = args[argIndex] ?? "null"; var formattableArg = arg as IFormattable; - if (formattableArg != null) + if (formattableArg is not null) { if (formattableArg is DateTime) { diff --git a/test/JavaScriptEngineSwitcher.Tests/Yantra/Es2015Tests.cs b/test/JavaScriptEngineSwitcher.Tests/Yantra/Es2015Tests.cs index 02efbd97..9b70b4da 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Yantra/Es2015Tests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Yantra/Es2015Tests.cs @@ -1,4 +1,6 @@ -namespace JavaScriptEngineSwitcher.Tests.Yantra +using Xunit; + +namespace JavaScriptEngineSwitcher.Tests.Yantra { public class Es2015Tests : Es2015TestsBase { @@ -6,5 +8,14 @@ protected override string EngineName { get { return "YantraJsEngine"; } } + + + #region Promises + + [Fact] + public override void SupportsPromises() + { } + + #endregion } } \ No newline at end of file diff --git a/test/JavaScriptEngineSwitcher.Tests/Yantra/Es5Tests.cs b/test/JavaScriptEngineSwitcher.Tests/Yantra/Es5Tests.cs index 681b3066..da0fea34 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Yantra/Es5Tests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Yantra/Es5Tests.cs @@ -1,6 +1,4 @@ -using Xunit; - -namespace JavaScriptEngineSwitcher.Tests.Yantra +namespace JavaScriptEngineSwitcher.Tests.Yantra { public class Es5Tests : Es5TestsBase { diff --git a/test/JavaScriptEngineSwitcher.Tests/Yantra/InteropTests.cs b/test/JavaScriptEngineSwitcher.Tests/Yantra/InteropTests.cs index ec922320..cb73959d 100644 --- a/test/JavaScriptEngineSwitcher.Tests/Yantra/InteropTests.cs +++ b/test/JavaScriptEngineSwitcher.Tests/Yantra/InteropTests.cs @@ -58,6 +58,35 @@ public override void EmbeddingOfInstanceOfCustomValueTypeWithFields() Assert.Equal(targetOutput3, output3); } + [Fact] + public override void EmbeddingOfInstanceOfCustomValueTypeWithReadonlyField() + { + // Arrange + var age = new Age(1979); + const string updateCode = "age.Year = 1982;"; + + // Act + JsRuntimeException exception = null; + + using (var jsEngine = CreateJsEngine()) + { + try + { + jsEngine.EmbedHostObject("age", age); + jsEngine.Execute(updateCode); + } + catch (JsRuntimeException e) + { + exception = e; + } + } + + // Assert + Assert.NotNull(exception); + Assert.Equal("Runtime error", exception.Category); + Assert.Equal("Cannot modify property Year of 47 which has only a getter", exception.Description); + } + [Fact] public override void EmbeddingOfInstanceOfCustomReferenceTypeWithFields() { @@ -108,14 +137,42 @@ public override void EmbeddingOfInstanceOfBuiltinValueTypeWithProperties() public override void EmbeddingOfInstanceOfCustomValueTypeWithProperties() { } + [Fact] + public override void EmbeddingOfInstanceOfCustomReferenceTypeWithProperties() + { + // Arrange + var person = new Person("Vanya", "Ivanov"); + const string updateCode = @"person.LastName = person.LastName.substr(0, 5) + 'ff'; +person.Patronymic = '';"; + + const string input1 = "person.FirstName"; + const string targetOutput1 = "Vanya"; + + const string input2 = "person.LastName"; + const string targetOutput2 = "Ivanoff"; + + // Act + string output1; + string output2; + + using (var jsEngine = CreateJsEngine()) + { + jsEngine.EmbedHostObject("person", person); + jsEngine.Execute(updateCode); + + output1 = jsEngine.Evaluate(input1); + output2 = jsEngine.Evaluate(input2); + } + + // Assert + Assert.Equal(targetOutput1, output1); + Assert.Equal(targetOutput2, output2); + } + #endregion #region Objects with methods - [Fact] - public override void EmbeddingOfInstanceOfBuiltinValueTypeWithMethods() - { } - [Fact] public override void EmbeddingOfInstanceOfCustomValueTypeAndCallingOfItsGetTypeMethod() { @@ -463,22 +520,48 @@ public override void EmbeddingOfCustomReferenceTypeWithField() Assert.Equal(targetOutput, output); } - #endregion + [Fact] + public override void EmbeddingOfCustomReferenceTypeWithReadonlyFields() + { + // Arrange + Type runtimeConstantsType = typeof(RuntimeConstants); + const string updateCode = @"RuntimeConstants.MinValue = 1; +RuntimeConstants.MaxValue = 100;"; - #region Types with properties + // Act + JsRuntimeException exception = null; - [Fact] - public override void EmbeddingOfBuiltinValueTypeWithProperty() - { } + using (var jsEngine = CreateJsEngine()) + { + try + { + jsEngine.EmbedHostType("RuntimeConstants", runtimeConstantsType); + + lock (RuntimeConstants.SyncRoot) + { + jsEngine.Execute(updateCode); + } + } + catch (JsRuntimeException e) + { + exception = e; + } + } + + // Assert + Assert.NotNull(exception); + Assert.Equal("Runtime error", exception.Category); + Assert.Equal( + "Cannot modify property MinValue of function RuntimeConstants() { [clr-native] }" + + " which has only a getter", + exception.Description + ); + } #endregion #region Types with methods - [Fact] - public override void EmbeddingOfBuiltinValueTypeWithMethod() - { } - [Fact] public override void EmbeddingOfBuiltinReferenceTypeWithMethods() {