TypeScript and RequireJs work well together. Writing small modular code with Single Responsibilities (SOLID principles) is a good practice in any language and JavaScript is not an exception. AMD-Dependency Path Use amd-dependency path to include files you don’t need to use in code, but need to be loaded in order to run /// <amd-dependency path=”knockout-es5” /> Import Use import (translates to define([‘jquery’]) for adding in dependencies. Casing matters and must match the casing of the file ......
1. Add a BeforeBuild in your csproj file. Edit the xml with a text editor. <Target Name="BeforeBuild"> <Exec Condition="'$(Configuration)' == 'Release'" Command="script-optimize.bat" /> </Target> 2. Create the script-optimize.batREM "%~dp0" maps to the directory where this file exists cd %~dp0\..\YourProjectFolder call npm uninstall grunt call npm uninstall grunt call npm install --cache-min 604800 -g grunt-cli call npm install --cache-min 604800 grunt typescript requirejs copy ......