Global angular-cli
A small helper to avoid installing the awesome but huge angular-cli globally.
angular-cli: ~210MB
global-angular-cli: ~146KB
This project addresses the problem described in https://github.com/angular/angular-cli/issues/1263. This is pretty much a proof of concept until the angular-cli team creates a real solution.
Usage
npm i -g global-angular-cli // to create a new angular-cli projectngg new projectAcd projectAnpm i // or yarn // use every other command like normalngg servengg generate component myComp --no-specngg build -prod
What it does
ngg new testProj
creates thetestProj
dir and copies a fresh angular-cli project in 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)
What it does not
- does not install your dependencies (so your are free to use
yarn
) - does not initialize a git repository (
git init
) - does not recognize
ng new
command flags like--sytle=sass
(set it by hand inangular-cli.json
) - does not insert your project name in the following places, so you have to do this by hand
angular-cli.json
:"name": "project-name"
package.json
:"name": "project-name"
README.md
:# project-name
e2e/app.po.ts
:export class ProjectNamePage
e2e/e2e-spec.ts
: import, describesrc/index.html
:<title>project-name</title>
src/app/app.component.spec.ts
:describe('App: project-name', () => { ..