Skip to content

Instantly share code, notes, and snippets.

@jeandat
Last active October 25, 2020 12:26
Show Gist options
  • Save jeandat/e7f0fced1cddd4bed0ecc119922440d1 to your computer and use it in GitHub Desktop.
Save jeandat/e7f0fced1cddd4bed0ecc119922440d1 to your computer and use it in GitHub Desktop.
Create a new angular project with @angular/cli and yarn

Tell ng to use yarn all the times:

$ ng set --global packageManager=yarn

Create a new angular4 project:

$ ng new myapp --ng4 --routing --style=scss

By configuring yarn as THE package manager in advance, we don't have to deactivate the install phase and do it manually:

$ ng new myapp --ng4 --routing --skip-install
$ cd myapp
$ yarn

By default, ng will create a git repository and a first commit.

@haipham22
Copy link

haipham22 commented Oct 25, 2020

ng config -g cli.packageManager yarn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment