Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move the new wiki docs to main repo #3382

Merged
merged 1 commit into from
Dec 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/documentation/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ng build

## Overview
`ng build` compiles the application into an output directory

## Options
`--target` (`-t`, `-dev`, `prod`) define the build target

`--environment` (`-e`)

`--output-path` (`-o`) path where output will be placed

`--watch` (`-w`) flag to run builds when files change

`--surpress-sizes` flag to suppress sizes from build output

`--base-href` (`-bh`) base url for the application being built

`--aot` flag whether to build using Ahead of Time compilation
2 changes: 2 additions & 0 deletions docs/documentation/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
`ng get`
`ng set`
4 changes: 4 additions & 0 deletions docs/documentation/doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ng doc

## Overview
`ng doc [search term]` searches documentation on [angular.io](https://angular.io)
4 changes: 4 additions & 0 deletions docs/documentation/e2e.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ng e2e

## Overview
`ng e2e` executes end-to-end tests
14 changes: 14 additions & 0 deletions docs/documentation/generate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ng generate

## Overview
`ng generate [name]` generates the specified blueprint

## Available blueprints:
- [class](class)
- [component](component)
- [directive](directive)
- [enum](enum)
- [interface](interface)
- [module](module)
- [pipe](pipe)
- [service](service)
7 changes: 7 additions & 0 deletions docs/documentation/generate/class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ng generate class

## Overview
`ng generate class [name]` generates a class

## Options
`--spec` specifies if a spec file is generated
21 changes: 21 additions & 0 deletions docs/documentation/generate/component.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ng generate component

## Overview
`ng generate component [name]` generates a component

## Options
`--flat` flag to indicate if a dir is created

`--inline-template` (`-it`) specifies if the template will be in the ts file

`--inline-style` (`-is`) specifies if the style will be in the ts file

`--prefix` specifies whether to use the prefix

`--spec` specifies if a spec file is generated

`--view-encapsulation` (`-ve`) set the view encapsulation strategy

`--change-detection` (`-cd`) set the change detection strategy

`--skip-import` allows for skipping the module import
13 changes: 13 additions & 0 deletions docs/documentation/generate/directive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ng generate directive

## Overview
`ng generate directive [name]` generates a directive

## Options
`--flat` flag to indicate if a dir is created

`--prefix` specifies whether to use the prefix

`--spec` specifies if a spec file is generated

`--skip-import` allows for skipping the module import
4 changes: 4 additions & 0 deletions docs/documentation/generate/enum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ng generate enum

## Overview
`ng generate enum [name]` generates an enumeration
8 changes: 8 additions & 0 deletions docs/documentation/generate/interface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ng generate interface

## Overview
`ng generate interface [name] <type>` generates an interface

## Arguments

`type` optional string to specify the type of interface
9 changes: 9 additions & 0 deletions docs/documentation/generate/module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ng generate module

## Overview
`ng generate module [name]` generates an NgModule

## Options
`--spec` specifies if a spec file is generated

`--routing` specifies if a routing module file should be generated
11 changes: 11 additions & 0 deletions docs/documentation/generate/pipe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ng generate pipe

## Overview
`ng generate pipe [name]` generates a pipe

## Options
`--flat` flag to indicate if a dir is created

`--spec` specifies if a spec file is generated

`--skip-import` allows for skipping the module import
9 changes: 9 additions & 0 deletions docs/documentation/generate/service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ng generate service

## Overview
`ng generate service [name]` generates a service

## Options
`--flat` flag to indicate if a dir is created

`--spec` specifies if a spec file is generated
27 changes: 27 additions & 0 deletions docs/documentation/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ng init

## Overview
`ng init [name]` initializes, or re-initializes, an angular application.

Initialization is done in-place, meaning that the generated application is initialized in the current directory.

## Options
`--dry-run` (`-d`) run through without making any changes

`--skip-npm` (`-sn`) skip installing npm packages

`--skip-git` (`-sg`) skip initializing a git repository

`--directory` (`-dir`) the directory name to create the app in

`--source-dir` (`-sd`) the name of the source directory

`--style` the style file default extension

`--prefix` (`p`) the prefix to use for all component selectors

`--routing` flag to indicate whether to generate a routing module

`--inline-style` (`is`) flag to indicate if the app component should have an inline style

`--inline-template` (`it`) flag to indicate if the app component should have an inline template
27 changes: 27 additions & 0 deletions docs/documentation/new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ng new

## Overview
`ng new [name]` creates a new angular application.

Default applications are created in a directory of the same name, with an initialized Angular application.

## Options
`--dry-run` (`-d`) run through without making any changes

`--skip-npm` (`-sn`) skip installing npm packages

`--skip-git` (`-sg`) skip initializing a git repository

`--directory` (`-dir`) the directory name to create the app in

`--source-dir` (`-sd`) the name of the source directory

`--style` the style file default extension

`--prefix` (`p`) the prefix to use for all component selectors

`--routing` flag to indicate whether to generate a routing module

`--inline-style` (`is`) flag to indicate if the app component should have an inline style

`--inline-template` (`it`) flag to indicate if the app component should have an inline template
125 changes: 125 additions & 0 deletions docs/documentation/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Angular CLI

### Overview
The Angular CLI is a tool to initialize, develop, scaffold and maintain [Angular](https://angular.io) applications

### Getting Started
To install the angular-cli:
```
npm install -g angular-cli
```

Generating and serving an Angular project via a development server
[Create](new) and [run](serve) a new project:
```
ng new my-project
cd new-project
ng serve
```
Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

### Build Targets and Environment Files

`ng build` can specify both a build target (`--target=production` or `--target=development`) and an
environment file to be used with that build (`--environment=dev` or `--environment=prod`).
By default, the development build target and environment are used.

The mapping used to determine which environment file is used can be found in `angular-cli.json`:

```json
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
```

These options also apply to the serve command. If you do not pass a value for `environment`,
it will default to `dev` for `development` and `prod` for `production`.

### Bundling

All builds make use of bundling, and using the `--prod` flag in `ng build --prod`
or `ng serve --prod` will also make use of uglifying and tree-shaking functionality.

### Running unit tests

```bash
ng test
```

Tests will execute after a build is executed via [Karma](http://karma-runner.github.io/0.13/index.html), and it will automatically watch your files for changes. You can run tests a single time via `--watch=false` or `--single-run`.

### Running end-to-end tests

```bash
ng e2e
```

Before running the tests make sure you are serving the app via `ng serve`.
End-to-end tests are run via [Protractor](https://angular.github.io/protractor/).

### Global styles

The `styles.css` file allows users to add global styles and supports
[CSS imports](https://developer.mozilla.org/en/docs/Web/CSS/@import).

If the project is created with the `--style=sass` option, this will be a `.sass`
file instead, and the same applies to `scss/less/styl`.

You can add more global styles via the `apps[0].styles` property in `angular-cli.json`.

### Global Library Installation

Some javascript libraries need to be added to the global scope, and loaded as if
they were in a script tag. We can do this using the `apps[0].scripts` and
`apps[0].styles` properties of `angular-cli.json`.

As an example, to use [Bootstrap 4](http://v4-alpha.getbootstrap.com/) this is
what you need to do:

First install Bootstrap from `npm`:

```bash
npm install bootstrap@next
```

Then add the needed script files to `apps[0].scripts`:

```json
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/tether/dist/js/tether.js",
"../node_modules/bootstrap/dist/js/bootstrap.js"
],
```

Finally add the Bootstrap CSS to the `apps[0].styles` array:
```json
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.css",
"styles.css"
],
```

Restart `ng serve` if you're running it, and Bootstrap 4 should be working on
your app.

### Additional Commands
* [ng new](new)
* [ng init](init)
* [ng serve](serve)
* [ng generate](generate)
* [ng test](test)
* [ng e2e](e2e)
* [ng build](build)
* [ng get/ng set](config)
* [ng docs](docs)

### How to Guides
* Setup AngularFire _(coming soon)_
* Include bootstrap (CSS) _(coming soon)_
* Include Font Awesome _(coming soon)_
* Setup of global styles _(coming soon)_
* Setup bootstrap with SASS _(coming soon)_
* Setup Angular Material 2 _(coming soon)_
37 changes: 37 additions & 0 deletions docs/documentation/serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ng serve

## Overview
`ng serve` builds the application and starts a web server

## Options
`--port` (`-p`) port to serve the application on

`--host` (`-H`)

`--proxy-config` (`-pc`)

`--watcher` (`-w`) provide a new watcher

`--live-reload` (`-lr`) flag to turn off live reloading

`--live-reload-host` (`-lrh`) specify the host for live reloading

`--live-reload-base-url` (`-lrbu`) specify the base URL for live reloading

`--live-reload-port` (`-lrp`) port for live reloading

`--live-reload-live-css` flag to live reload CSS

`--target` (`-t`, `-dev`, `-prod`) target environment

`--environment` (`-e`) build environment

`--ssl` flag to turn on SSL

`--ssl-key` path to the SSL key

`--ssl-cert` path to the SSL cert

`--aot` flag to turn on Ahead of Time compilation

`--open` (`-o`) opens the app in the default browser
19 changes: 19 additions & 0 deletions docs/documentation/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ng test

## Overview
`ng test` compiles the application into an output directory

## Options
`--watch` (`-w`) flag to run builds when files change

`--browsers` override which browsers tests are run against

`--colors` enable or disable colors in the output (reporters and logs)

`--log-level` level of logging

`--port` port where the web server will be listening

`--reporters` list of reporters to use

`--build` flag to build prior to running tests