476595 (4) [Avatar] Offline
#1
Hi!


I found nice Angular 2 TypeScript example https://github.com/ishara/angular2-without-npm what does not need nodejs. However compiling in browser takes time. Could anyone show how to compile that example from command line so that browser would get already compiled version of what ever is in app folder but that does not require nodejs?

The reason is that I plan to serve html from non nodejs server. But doing all this npm stuff forces me to run it from node server. I want to compile it from command line with tsc or webpack or something.
Yakov Fain (215) [Avatar] Offline
#2
After you build the bundles with ng build in the dist dir on the client, you can deploy them under any Web server you want. For example, in this presentation I show how to deploy the app under the Java Spring Boot server:
https://youtu.be/k8r76d8QzXs?t=2241
476595 (4) [Avatar] Offline
#3
It said:
You have to be inside an Angular CLI project in order to use the build command.


What would be minumum files/code that I would have to add?
Yakov Fain (215) [Avatar] Offline
#4
Just cd into the directory with the generated project and run ng build. You don't need to add any files. The generated app already has a module and an app component.
476595 (4) [Avatar] Offline
#5
cd into app didnt work. cd to root of it didnt work either.

Could you take a look at this example project (which I am trying to use) https://github.com/ishara/angular2-without-npm ?

I have no idea what I should do there. Angular tutorials are always loaded with so much stuff that it is hard to know what I need, or how to change it for my need.