The angular-cli team decreased the install time drastically and the approch taken here would not work with future versions of the cli.
A small helper to avoid installing the awesome but huge angular-cli globally.
angular-cli: ~210MB
global-angular-cli: ~50KB
This project addresses the problem described in angular/angular-cli#1263. This is pretty much a proof of concept until the angular-cli team creates a real solution (or adapts this, who knows..).
npm i -g global-angular-cli
// to create a new angular-cli project
ngg new projectA
cd projectA
// use every other command like normal
ngg serve
ngg generate component myComp --no-spec
ngg build -prod
ngg new testProj
creates the project folder and locally installs the real angular-cli and proxies ang init
to itngg <command> <args>
proxies the command and args to the locally installed angular-cli (the global version of the real angular-cli does the same)
- does not initialize a git repository (use
git init
) (ng init
strangely does not do that..) - does not recognize
ng new
command flags like--sytle=sass
(set it by hand inangular-cli.json
) (coming soon..)