1.4.0 • Published 9 years ago
global-angular-cli v1.4.0
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 project
ngg new projectA
cd projectA
npm i // or yarn
// use every other command like normal
ngg serve
ngg generate component myComp --no-spec
ngg build -prodWhat it does
ngg new testProjcreates thetestProjdir 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 newcommand 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-namee2e/app.po.ts:export class ProjectNamePagee2e/e2e-spec.ts: import, describesrc/index.html:<title>project-name</title>src/app/app.component.spec.ts:describe('App: project-name', () => { ..