The new project type could have the following features:
- Contains .js, .css, and .html files.
- Represents a complete UI component - i.e. a module or widget.
- Runs JSLint or JSHint on build and reports any errors and violations.
- The build output should also output any HTML files (as ASP.Net partial views).
- Intellisense is provided based on the referenced projects.
- ASP.Net MVC should provide razor @Script/@Style syntax to include the minified bundles with reference to their project names.
- ASP.Net MVC should permit referencing the partial views from the build output.
- Test methods in the test projects are picked up and displayed in the Test Runner - the same as any C# test method.
- The test projects include a built-in assertion library, or permit external libraries, such as QUnit.
- It should also be possible to debug the project via Page Inspector.
Support for this form of project would be a killer feature, especially since Visual Studio is the best IDE to use for TypeScript code completion.
I currently hack around this limitation by defining a regular HTML project to take advantage of the Visual Studio editor, and using other tools to build/test/run the program.
The ordering of scripts during build would be managed by the XML <reference path=""/> comment
The debug output would just be one concatenated file, and the release output would be the minified version of the debug output
All "built" files should be wrapped in an IIFE
Steve Sanderson does something similar with his Knockout Library (https://github.com/SteveSanderson/knockout/tree/master/build)
Tiernay Roland commented
Why not just support gulp/grunt/broccile as project?
Well it looks like it is now in the making. Checkout Visual Studio Code. I can guarantee that this cross-platform tool will get folded into the main VS at some point.
Still under review? Any progress? What about a simple project system with Task Runner Explorer, Bower and NPM?
Given this is "under review" does that mean you cannot do this in vs 2015? :(
Typically Bower and grunt support should be more than enough for this kind of project .
Konstantin Tarkus commented
Noel Abrahams commented
Thanks for considering this idea for review.
It would be great if we are able to reference a TypeScript project file (that has HTML and CSS as well) from an ASP.Net Web Application and use it to render a website.
Here are a couple of related discussions from the TypeScript codeplex site:
Chris Ammerman commented · December 19, 2012 8:14 p.m
Noel Abrahams commented · November 22, 2012 2:11 p.m.
With the advent of TypeScript, the major change in the above is from "Runs JSLint or JSHint on build and reports any errors and violations" to using the TypeScript compiler instead.
There is now a TypeScript project type and this suggestion is to develop that project type so that it can be referenced from an ASP.Net Web Application.
This feedback item along with votes was transferred from the ASP.NET User Voice site. If you would like to view the original comment history, please go to http://aspnet.uservoice.com/forums/41199-general-asp-net/suggestions/3229143.
Borek Bernard commented
Jordan Matthiesen commented
Program Manager, Microsoft Visual Studio
If you could provide a "Visual Studio-ified" version of Grunt (http://gruntjs.com/), I think this would be 90% there.
Borek Bernard commented
Fully agree, sometimes JS library needs to be shared amongst more projects in a solution and currently, there is no straightforward way to do it. Also, you may want to compile it using Closure, minify, obfuscate etc. and this all could be built-in.