From 3e216aca0adeb547ada3783ab534ce20a6de48f5 Mon Sep 17 00:00:00 2001 From: jbavari Date: Mon, 2 Nov 2015 18:00:34 -0700 Subject: [PATCH] Chore(readme): Update readme for usage of CLI and generators. Update API docs on usage. --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a2f63032bb..fb71ed9bb5 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,12 @@ We are also building out a number of starter projects, including the Ionic 2 sta ### Tooling - At the moment, ionic-framework exports one function, `generate`, that can be used to scaffold new pages in an Ionic app. It is used by the [Ionic CLI's](https://github.com/driftyco/ionic-cli) `generate` command. + At the moment, ionic-framework exports one function, `generate`, that can be used to scaffold new pages in an Ionic app. It is used by the [Ionic CLI's](https://github.com/driftyco/ionic-cli) `generate` command (also use `g` as an alias). + +#### Usage: + +* `ionic generate page MyPage` - Generate a basic page HTML, JS, and SCSS files. +* `ionic g tabs MyTabPage` - Generate a page with tabs and the tab pages with those. #### Methods @@ -64,7 +69,7 @@ Creates the js, html, and scss file for a new page, based on the supplied [Gener - **config** (Object) Config object, with the following options: - `appDirectory` - root directory of the Ionic project - `generator` - which [generator](#generators) to use, default is `page`. - - `name` - + - `name` - the name of the component to generate. Example: ``` @@ -75,5 +80,5 @@ Example: #### Generators - `page`, a blank page - `tabs`, a page with tab navigation -- `sidemenu` +- `directive`, an Angular2 directive