Skip to content

Releases: vtfuture/RequireJSDotNet

3.1 Release

25 Feb 16:44
Compare
Choose a tag to compare
New in RequireJS.NET v3.1

2.2 Release

19 Jul 16:47
Compare
Choose a tag to compare
New in RequireJS.NET v2.2
  • All packages now target .NET 4.5 only, dependencies updated to Json 9.0 and MVC 5.2
  • Compressor fixes and improvements see pull request #72 introduces breaking changes
  • Compressor relative file paths fix see pull request #62
  • Compressor dir aliases support see pull request #59
  • RequireJS EntryPointResolver controller path formats and areas into arrays see pull request #69
  • RequireJS configuration caching, see example here
  • up-to-date documentation requirejsnet.veritech.io
Upgrade from Compressor v2.1.x
  • The Compressor package is a now tool package and the dll is no longer referenced in project
  • RequireJsNet.Compressor.targets is automatically included into the cproj file, RequireJs.json files are now processed on build by default
  • Compressor 2.0.x build task must be update with the new path AssemblyFile="...\packages\RequireJsNet.Compressor.2.2.3\tools\RequireJsNet.Compressor.dll"
  • for more details on how to configure Compressor 2.2 in Visual Studio and on a build server see requirejsnet.veritech.io/compressor

2.1 Release

05 Jan 11:21
Compare
Choose a tag to compare
New in RequireJS.NET v2.1
  • Added the ability to fully customize entry point resolution see Overriding entry point path generation
  • Documentation and example clean-up and improvements
  • Fixed bug where an exception would be thrown when encountering a shim item with no dependencies
  • Autocompressor attempts to normalize module names in require definitions

2.0.38

25 Sep 14:23
Compare
Choose a tag to compare
New in RequireJS.NET v2.0.38
  • added configuration parser/mergers unit tests (xUnit)
  • added tests for critical paths through ConfigMerger
  • added support for module parser to process define(function) modules
  • ConfigMerger now also merges OutputPath and IsVirtual of bundles
  • ConfigMerger now overrides autobundle outputPath if a new one is set
  • fixed ConfigMerger nullchecking of maps collection
  • added support for .NET 4.0 and ASP.NET MVC v3 or newer

2.0 Release

31 Aug 23:35
Compare
Choose a tag to compare
New in RequireJS.NET v2.0
  • new JSON config format compatible with require.js configuration object, the XML format from v1.x is deprecated
  • passing values between ASP.NET and JavaScript done via a global filter (RequireOptionFilter), the RequireController is no longer need and has been removed
  • breaking changes in RenderRequireJsSetup HTML helper, it takes a single argument of type RequireRendererConfiguration
  • improved auto bundling capabilities
  • compressor and config parser refactoring
  • export .resx files to JavaScript in i18n format (MsBuild task)
  • project website with updated tutorials requirejsnet.veritech.io
  • up-to-date documentation wiki
  • various bug fixes
Upgrade from v1.x

If you are currently using RequireJS.NET v1.x be aware that v2 introduced breaking changes, please follow the upgrade guide.

1.0.28 (v1 final)

27 Aug 21:53
Compare
Choose a tag to compare
New in RequireJS.NET v1.0.28
  • refactoring config parsing
  • added symbols package

100% compatible with v2.1.12

1.0.22

22 Mar 17:41
Compare
Choose a tag to compare
New in RequireJS.NET v1.0.22
  • bug fix entryPointPath othen then ~/Scripts/ not found
  • bug fix RequireJS.config default path not found
  • bug fix XmlReader object reference not set when shim entry would not have exports defined

100% compatible with v2.1.11

1.0.19

15 Mar 09:35
Compare
Choose a tag to compare
New in RequireJS.NET v1.0.19
  • Added optional parameter entryPointRoot to RenderRequireJsSetup methods

You can use entryPointRoot to override the default "~/Scripts/" root of js controllers:

Scripts/
    ├── Components/
    ├── Plugins/
    └── Widgets/
MyApp/
    └── Controllers/
        ├── Root/
        ├── Admin/
        └── Common/

Setup:

@Html.RenderRequireJsSetup(
    baseUrl: Url.Content("~/Scripts/"),
    requireUrl: Url.Content("~/Scripts/Components/require.js"),
    urlArgs: MvcRenders.RenderAppVersion(),
    configPath: Server.MapPath("~/RequireJS.release.config"),
    entryPointRoot: "~/MyApp/")

1.0.18

02 Mar 12:08
Compare
Choose a tag to compare
New in RequireJS.NET v1.0.18
  • Added optional parameter urlArgs to RenderRequireJsSetup methods

You can use urlArgs to append the app version value to each of the script urls for cache busting.

Setup:

@Html.RenderRequireJsSetup(
    baseUrl: Url.Content("~/Scripts"),
    requireUrl: Url.Content("~/Scripts/require.js"),
    urlArgs: MvcRenders.RenderAppVersion(),
    configPath: Server.MapPath("~/RequireJS.release.config"))

App version helper:

public static string RenderAppVersion()
{
    return "v=" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
}

1.0.14

18 Nov 12:56
Compare
Choose a tag to compare
New in RequireJS.NET v1.0.14
  • bundling is now supported via RequireJsNet.Compressor

Define bundles inside config file:

<configuration>
  <paths>
    <path key="jquery" value="jquery-1.10.2" />
    <path key="bootstrap" value="bootstrap" />
    <path key="respond" value="respond" bundle="respond" />
  </paths>
  <bundles>   
    <bundle name="mainExplicit" outputPath="Bundles\main.min.js">
      <bundleItem path="jquery" />
      <bundleItem path="bootstrap" />
    </bundle>
    <bundle name="defaultBundleTest" outputPath="Bundles\WithDefault\" includes="respond">
    <bundleItem path="controllers\root\home\index" />
    </bundle>
  </bundles>
</configuration>

RequireJS.NET Compressor MSBuild task parses RequireJS.config files and builds bundles using YUI compressor.

NuGet Package

PM> Install-Package RequireJsNet.Compressor