Typescript on Asp.net Core
See original GitHub issueI’m submitting a bug report
- Library Version: 0.15.0
Please tell us about your environment:
-
Operating System: Windows [8.1]
-
Node Version: 4.4.5
-
NPM Version: 3.10.5
-
Language: TypeScript 1.8.6 & 2
Current behavior: I have tried to set-up Aurelia on latest ASP.NET Core using CLI. I am getting error attached in picture when using au build
Expected/desired behavior:
Steps to reproduce:
- Create Asp.net Core project in VS2015 Update 3
- Change to the xproj directory
- Run au new --here with the below options a) Platform -> ASP.NET Core b) Transpiler -> Typescript c) CSS Processor -> None d) Unit tests -> No e) Create this project -> Yes f) Install dependencies -> Yes
- Run au build
-
What is the expected behavior?
Be able to bundle app.
-
What is the motivation / use case for changing the behavior?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Create an ASP.NET Core app with TypeScript - Visual Studio
Tutorial: Create an ASP.NET Core app with TypeScript in Visual Studio · Prerequisites · Create a new ASP.NET Core MVC project · Add...
Read more >Documentation - ASP.NET Core - TypeScript
Install ASP.NET Core and TypeScript · Create a new project · Add TypeScript · Add TypeScript code · Set up the build ·...
Read more >Build a CRUD App with ASP.NET Core and TypeScript
Secure Your ASP.NET Core + TypeScript Application · In the top menu, click on Applications · Click on Add Application · Select Web...
Read more >Add TypeScript to an ASP.NET Core project | by Darren Neimke
In this article, I'll walk through the steps it takes to add TypeScript to an ASP.NET Core project. You can follow along by...
Read more >How to use TypeScript in an ASP.NET Core application ...
Overview. This article explains about how to use TypeScript instead of JavaScript in an ASP.NET application for manipulating the Syncfusion EJ2 for ASP....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The sweet spot for me would be to have VS do the tranpiling so you get any TS errors integrated in to the usual VS error pane. Then use the aurelia-cli for bundling etc… And finally use Kestrel for dev server, with BrowserSync etc…
I’ve not got there yet unfortunately…
Using the Command Task Runner extension (https://visualstudiogallery.msdn.microsoft.com/e6bf6a3d-7411-4494-8a1e-28c1a8c4ce99) to add
au build
as a post-build task in VS helps to some extentOr you can call some of the aurelia-cli functionality directly from gulp within VS.
Using aurelia-cli inside VSCode works better, but being able to live just within VS2015 is the goal (for me, at least)…
I believe that the we no longer need this message if we merge the PR above:
I do wonder why we have included that message in the docs though. Simply running the project from VS will transpile the typescript files (and launch IIS), but it does not invoke the CLI at all, so it is not going to regenerate the bundles. On the other hand, running
au run --watch
runs the project using browsersync, and you’ll not be using ASP.NET Core at all. This bit leaves a lot to the imagination when it comes to running the app. @AshleyGrant when you are looking into this issue, can you also see whether or not i’m missing something or if the docs is really missing this info?My gut feeling is that we will want ASP.NET Core to serve the files from
wwwroot
(e.g. by addingapp.UseFileServer()
to theConfigure
method inStartup.cs
). Then in the background we need to keep the bundles updated, but we don’t need to run browsersync, soau build --watch
could be helpful here.au build --watch
was proposed in https://github.com/aurelia/cli/issues/265 for exactly this reasonI guess it all depends on whether or not you want ASP.NET core to serve the frontend