Hasholef
Hasholef

Reputation: 753

Using the global angular-cli in order to build my app

I have a build process (TFS) for gated check-ins. The build does the follow:

The npm install part takes 2.9 minutes mostly because it installs angular-cli. I have the angular-cli installed globally on the machine, why can't I use the global installation?

If I try to remove @angular/cli from my devDependencies, I got the error:

You have to be inside an angular-cli project in order to use the build command after reinstall of angular-cli

Versions:

Upvotes: 2

Views: 690

Answers (1)

Yakov Fain
Yakov Fain

Reputation: 12376

I'm not sure if you can remove the local install of @angular/cli, but I agree, this would be nice. To speed up you installs, switch from using npm to a faster package manager yarn. After installing yarn, your commands will look slightly different:

yarn install
yarn run build
yarn run build:test

But you'll definitely see the speed improvement. I blogged about Yarn here https://yakovfain.com/2016/11/06/angular-cli-speed-up-installing-dependencies-with-yarn

Upvotes: 1

Related Questions