From 6334553b08dd5a7b974236f4f20a01d3c6170ffd Mon Sep 17 00:00:00 2001 From: rodyhaddad Date: Mon, 3 Aug 2015 20:07:32 +0300 Subject: [PATCH] docs(README): add initial draft of README --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000000..9050dcc40a9b --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Angular-CLI + +## Note + +This projects is very much still a work in progress. + +We still have a long way before getting out of our alpha stage. +If you wish to collaborate while the project is still young, checkout [our list issues](https://github.com/angular/angular-cli/issues). + +## Installation + +```bash +npm install -g angular-cli +``` + +## Usage + +```bash +ng --help +``` + +### Generating and serving an Angular2 project + +```bash +ng new PROJECT_NAME +cd PROJECT_NAME +ng serve +``` + +## Development Hints + +### Working with master + +```bash +git clone https://github.com/angular/angular-cli.git +cd angular-cli +npm link +``` + +`npm link` is very similar to `npm install -g` except that instead of downloading the package +from the repo, the just cloned `angular-cli/` folder becomes the global package. +Any changes to the files in the `angular-cli/` folder will immediately affect the global `angular-cli` package, +allowing you to quickly test any changes you make to the cli project. + +Now you can use `angular-cli` via the command line: + +```bash +ng new foo +cd foo +npm link angular-cli +ng server +``` + +`npm link angular-cli` is needed because by default the globally installed `angular-cli` just loads +the local `angular-cli` from the project which was fetched remotely from npm. +`npm link angular-cli` symlinks the global `angular-cli` package to the local `angular-cli` package. +Now the `angular-cli` you cloned before is in three places: +The folder you cloned it into, npm's folder where it stores global packages and the `angular-cli` project you just created. + +Please read the official [npm-link documentation](https://www.npmjs.org/doc/cli/npm-link.html) +and the [npm-link cheatsheet](http://browsenpm.org/help#linkinganynpmpackagelocally) for more information. \ No newline at end of file