Merge pull request #187 from teiles/master

/src/build.ps1 ... destination folders not being recursively build.
Some code formatting in the src build file.
Basic plugin architecture introduced.

-widget module moved to the plugins folder
-removed Durandal.Router nuget package in favor of including all
official plugins as part of the Durandal package
-fixed up the samples to demonstrate loading and configuring the widget
plugin
Reversed the order of documentAttached callback exec.

Now the documentAttached callbacks will be executed from the inside out
so that child view/viewmodels can do their work before the parent(s).
Implemented errors for system.acquire.

-Added viewEngine.createFallbackView. Now, if a view is not found, we
generate an error view here. This can be overriden to allow developers
to create custom view 404 fallback generation.
-Cleaned up system.error usage.
Remove unnecessary shims for jQuery and Knockout
Merge pull request #189 from neverfox/pull-request/noshim

Remove unnecessary shims for jQuery and Knockout
Moved modals into a plugin. Combined with message box.
Refining widget config. Optimizing documentAttached callback perf.
Fixing up old files and nugets after modal change.
Changes to modals.

-Renamed the modal module to dialog.
-Dialog info now kept in a more "private" field.
-Use dialog.close() to close a dialog.
-Internal renaming.
-Renamed isModalOpen to isOpen
-Renamed app.showModal to app.showDialog
-Fixed up samples.
Changed system.getObjectResolver to system.resolveObject.

This simplifies usage and implementation.
Added a new router binding handler.

The new router binding handler requires the installation of the router
as a plugin. The new handler simplifies the router binding process by
automatically hooking up the router by first looking for a router
property on the binding, second looking up a router property on the view
model and finally falling back to the root router. See the samples for
example usage.
Added buildLog config option so it can be configured from outside i.e. useful for running multiple optimization processes in same folder in parallel - otherwise you'll get an IO error
* Added support for following r.js options:
     [OptionList('i', "ignore", HelpText = "Ignore certain files or folders relative to the app path, separated by semicolon ;", Separator = ';')]
     public IList<string> Ignores { get; set; }

    [Option('o', "output", DefaultValue = "main-built.js", HelpText="Specify the name of the output combined and minified built file. Relative to the application source folder (-s option)")]
    public string OutputFileName { get; set; }

    [Option("buildFile", DefaultValue = "app.build.js", HelpText="Specify where the json configuration for r.js will be saved within this folder")]
    public string BuildFile { get; set; }

    [Option("mainEntry", DefaultValue = "main.js", HelpText = "Specify the main entry point file")]
    public string MainEntry { get; set; }

    [Option("name", DefaultValue = "main", HelpText = "Specify the module name")]
    public string ModuleName { get; set; }

    [Option("lang", Required = false, DefaultValue = "en", HelpText = "Specify the language to be replaced %LANG% paths on modules. You need to provide a custom configuration file first (-c) that has defined modules and we'll replace the %LANG% with this value in all the 'include' options of all the provided modules")]
    public string Lang { get; set; }

    [Option("preserveLicenseComments", DefaultValue = true, HelpText = "Specify false to remove the license comments")]
    public bool? PreserveLicenseComments { get; set; }

    [OptionList('r', "require", HelpText = "Default: main. Include extra requires separated by semicolon (;)", Separator = ';')]
    public IList<string> InsertRequire { get; set; }

    [OptionList('x', "exclude", HelpText = "Exclude certain modules i.e. if they were built before", Separator = ';')]
    public IList<string> Excludes { get; set; }

* %LANG% is very useful if you are targeting multi-language modules.
If used with -c yourConfigSource.js and in there define
modules: [{
  name: "main",
  include: [
    "durandal/*.js", //*.js from durandal folder only
    "main/**.js", //*.js from main folder and its sub-folders recursively
    "text!views/%LANG%/**.html", //*.html from i.e. views/en/*.html and its sub-folders recursively
  ],

* JSON can now be a javascript the same way r.js supports
i.e. modules.export = { JSON }
This is very useful b/c you won't get any errors while editing your configuration.js file in VS2012
Restored braces editor format
Merge remote-tracking branch 'upstream/master'

Conflicts:
	platforms/HTML/Samples/lib/require/r.js
	platforms/HTML/StarterKit/lib/require/r.js
	platforms/Microsoft.NET/Nuget/Durandal/content/Scripts/r.js
	platforms/Microsoft.NET/Optimizer/Optimizer/IO.cs
	skeletons/nuget/Durandal.Router/content/App/durandal/amd/r.js
	skeletons/nuget/Durandal.Transitions/content/App/durandal/amd/r.js
	skeletons/nuget/Durandal/content/App/durandal/amd/optimizer.exe
	skeletons/nuget/Durandal/content/App/durandal/amd/optimizer.pdb
	skeletons/nuget/Durandal/content/App/durandal/amd/r.js
	skeletons/vstemplate/DurandalTemplate/DurandalTemplate/App/durandal/amd/optimizer.exe
	skeletons/vstemplate/DurandalTemplate/DurandalTemplate/App/durandal/amd/optimizer.pdb
	skeletons/vstemplate/DurandalTemplate/DurandalTemplate/App/durandal/amd/r.js
Enabled Nuget Package restore
BREAKING CHANGES to Lifecycle

-viewAttached renamed to attachedToParent
-documentAttached renamed to compositionComplete
-documentDetached renamed to detachedFromDocument
-composition.current.completed renamed to composition.current.complete
-Changed router-based events for route complete scenarios. Now they are
router:navigation:attached-to-parent and
router:navigation:composition-complete
-composition context.triggerViewAttached renamed to triggerAttach
-renamed composition settings alwaysAttachView to alwaysTriggerAttach
Merge pull request #191 from dotnetwise/master

Modules, localization and more r.js options support