What does the ngc command do in an angular app?
Asked Answered
P

1

9

I just came across this command in a tutorial and I am struggling to find any information on the ngc command. Can anyone shed some light please?

ng build --prod && ngc

Pamplona answered 17/8, 2018 at 10:24 Comment(0)
Q
8

It's related to Angular Template Compiler.

ngc is a drop-in replacement for tsc.

As per repo doc:

First install angular, see https://github.com/angular/angular/blob/master/CHANGELOG.md#200-rc0-2016-05-02

$ npm install @angular/compiler-cli typescript@next @angular/platform-server @angular/compiler

Optional sanity check, make sure TypeScript can compile.

$ ./node_modules/.bin/tsc -p path/to/project

ngc is a drop-in replacement for tsc.

$ ./node_modules/.bin/ngc -p path/to/project

You can find complete description here

Quinque answered 17/8, 2018 at 10:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.