mathis FLAVIN
mathis FLAVIN

Reputation: 45

Deploy a angular 6 project without angular CLI

I am looking to deploy a project angular (angular 6) to a host (OVH). I did not create my application with Angular CLI so I can't use "ng build "

I've been looking for several weeks What should I do ?

Thank you in advance for your answers.

Upvotes: 2

Views: 3196

Answers (4)

Eran Peled
Eran Peled

Reputation: 929

I think you need to read this, and than come up with a solution.

https://blog.angularindepth.com/setting-up-angular-from-scratch-1f518c65d8ab

Upvotes: 1

Mike Tung
Mike Tung

Reputation: 4821

If you are using a build tool like webpack/gulp/grunt/etc you can write a script to transpile all the .ts files down to js and html/scss as well. Then you just serve your dist.

Upvotes: 1

Eran Peled
Eran Peled

Reputation: 929

You can add angular cli to your npm, it is global not project specific

npm install -g @angular/cli

than simply write:

ng build —prod

Take the files inside /dist dir and simply put  them on a web server

Good luck

Upvotes: -1

Massimo Costa
Massimo Costa

Reputation: 1860

Quick and dirty solution:

  • create a new empty project with ng new
  • delete all source files
  • copy your source files in the src/app/ folder

Upvotes: 2

Related Questions