WebSharper 3.6
The main new feature is the capability to point to our CDNs for the WebSharper libraries. You can simply add the following setting to your application configuration file (Web.config
or App.config
depending on the project type):
<appSettings>
<add key="WebSharper.StdlibUseCdn" value="true" />
</appSettings>
The links generated by WebSharper, instead of pointing to /Scripts/WebSharper/...
for scripts and /Content/WebSharper/...
for CSS, will point to //cdn.websharper.com/{assembly}/{version}/{filename}
. You can configure this URL by setting the WebSharper.StdlibCdnFormat
configuration setting. And finally, you can configure the CDN URL for the resources of a specific assembly (from the standard WebSharper library or not) by setting the WebSharper.CdnFormat.{assemblyname}
configuration setting.
Here is the full change log:
-
#488: Allow adding a macro attribute on a type. The macro is invoked for all static and instance method calls on this type.
-
Fix issue preventing macro use in argument to a PropertyGet/Set.
-
#490: Retrieve appConfig parameters from Web.config or App.config when building a single-page application.
-
#493: Add WebSharperReference project item. This allows you to pass references to the WebSharper compiler that are not referenced by the compiled assembly. For example, adding the following to your project file:
<ItemGroup> <WebSharperReference Include="..\packages\WebSharper.3.6.2.220\lib\net40\WebSharper.Core.dll" /> <WebSharperReference Include="..\packages\WebSharper.3.6.2.220\lib\net40\WebSharper.Core.JavaScript.dll" /> <WebSharperReference Include="..\packages\WebSharper.3.6.2.220\lib\net40\WebSharper.JavaScript.dll" /> <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.JQuery.dll" /> <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.Main.dll" /> <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.Control.dll" /> <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.Collections.dll" /> </ItemGroup>
and removing the corresponding
<Reference>
entries allows you to use the proxies from the standard libraries without referencing them in your assembly. -
Add
AssemblyFileVersionAttribute
to all standard library assemblies. -
#494: Add support for pointing resources to a CDN (see above).
-
#495: Add proxies for
{Int32,Double,DateTime}.{MinValue,MaxValue}
. -
#496: Add proxy for
String.IsNullOrWhiteSpace
.