Adding support for angular-cli
Hi mark. First of all, this is an awesome template. Thanks for taking care of all the grunt work. My question is do you plan on adding any support for angular-cli in future?
Thanks!
Thank you! Let me get back to you tomorrow with more details. But basically through .NET & npm scripts we have most of the power of the CLI (without the generators).
What aspects of the CLI do you think we need the most, we can try to incorporate the missing pieces!
I think we can create a generator for Yeomen-
http://yeoman.io/generators/
So that people can easily access and install this template with this popular generator and people can easily find this project.
How to create a Yeomen generator can be found here.
@Krishna-teja Sorry for the delay, so basically in our instance here, we can't use the CLI because we leverage a lot from .NET who handles most of the heavy lifting, and wiring up with things like webpack, etc.
Potentially sometime in the future if the CLI has an easy extendable feature, then I could incorporate it within it, but at the moment things like ng build / ng serve just aren't needed since we trigger them all manually here when running the project for example.
I hope that makes sense! If any other questions just let me know.
Hi @MarkPieszak . CLI added support for universal rendering. I tried to integrate it with your starter (use CLI instead of webpack, all other staff is more less the same) and I got the following results:
- CLI for the front bundles (usual Angular build, no any specific Universal behavior), webpack for server bundles with your starter - it was ok and the app does work
- I tried to integrate CLI to the server bundles instead of webpack. The server build was OK, it generated inline.bundle, main.bundle and lazy bundles. But as soon as I tried to consume main.bundle in HomeController via Prerenderer.RenderToString it throw an error webpackJsonp is not defined. As I can see webpackJsonp function is defined in inline.bundle, it is used window object. I am not sure if it can work with your starter and ASP.NET Core. Do you have any ideas?
Why CLI is important for us? We have quite good experience with CLI and we would like to go on using it. For now we have POC where it is used CLI for browser bundles and your starter with webpack for server bundles. It does work but it affects a build time. If would be great if we could use CLI for both browser and client bundles. For now CLI does support universal rendering and it looks like we just need to integrate it into your starter. Your assistance is appreciated here!