Skip to content

Commit 390f44d

Browse files
committed
rewrote readme to provide information about angular-fullstack
1 parent 7bc7acc commit 390f44d

File tree

1 file changed

+73
-30
lines changed

1 file changed

+73
-30
lines changed

Diff for: readme.md

+73-30
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,78 @@
1-
# AngularJS generator [![Build Status](https://secure.travis-ci.org/yeoman/generator-angular.png?branch=master)](http://travis-ci.org/yeoman/generator-angular)
1+
# AngularJS + Express Full Stack Generator
22

3-
Maintainer: [Brian Ford](https://github.com/btford)
3+
A generator for AngularJS, integrated with an Express `server.js` for full stack development. Featuring livereload of client and server files, grunt tasks that are integrated with express, and an easy deployment workflow.
44

5-
Based on [angular-seed](https://github.com/angular/angular-seed/)
5+
Based on [generator-angular](https://github.com/yeoman/generator-angular)
66

77

88
## Usage
99

10-
Install `generator-angular`:
10+
Install `generator-angular-fullstack`:
1111
```
12-
npm install -g generator-angular
12+
npm install -g generator-angular-fullstack
1313
```
1414

1515
Make a new directory, and `cd` into it:
1616
```
1717
mkdir my-new-project && cd $_
1818
```
1919

20-
Run `yo angular`, optionally passing an app name:
20+
Run `yo angular-fullstack`, optionally passing an app name:
2121
```
22-
yo angular [app-name]
22+
yo angular-fullstack [app-name]
2323
```
2424

25+
### Express
26+
27+
Launch your express server in development mode.
28+
```
29+
grunt server
30+
```
31+
32+
Launch your express server in production mode, uses the minified/optimized production app folder.
33+
```
34+
grunt server:dist
35+
```
36+
37+
### Livereload
38+
39+
`grunt server` will watch client files in `app/`, and server files inside `lib/`, restarting the Express server when a change is detected. This requires the [Livereload plugin](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) or equivalant to refresh your browser. Be sure that the plugin is enabled on the page you're testing.
40+
41+
### Deployment
42+
43+
While deployment should be easy enough with the `grunt dist` build, we provide an extremely simplifed deployment process for heroku.
44+
45+
`yo angular-fullstack:deploy heroku` for generating a deployment ready folder for [heroku.com](http://heroku.com/) from your project files.
46+
47+
**Create and Deploy an app in 4 steps**
48+
49+
1. `mkdir foo && cd foo`
50+
51+
2. `yo angular-fullstack`
52+
53+
3. `yo angular-fullstack:deploy heroku`
54+
55+
4. `cd heroku && git push heroku master`
56+
57+
That's it! Your app should be live and shareable. Type `heroku open` to view it.
58+
2559
## Generators
2660

2761
Available generators:
2862

29-
* [angular](#app) (aka [angular:app](#app))
30-
* [angular:controller](#controller)
31-
* [angular:directive](#directive)
32-
* [angular:filter](#filter)
33-
* [angular:route](#route)
34-
* [angular:service](#service)
35-
* [angular:provider](#service)
36-
* [angular:factory](#service)
37-
* [angular:value](#service)
38-
* [angular:constant](#service)
39-
* [angular:decorator] (#decorator)
40-
* [angular:view](#view)
63+
* [angular-fullstack](#app) (aka [angular-fullstack:app](#app))
64+
* [angular-fullstack:controller](#controller)
65+
* [angular-fullstack:directive](#directive)
66+
* [angular-fullstack:filter](#filter)
67+
* [angular-fullstack:route](#route)
68+
* [angular-fullstack:service](#service)
69+
* [angular-fullstack:provider](#service)
70+
* [angular-fullstack:factory](#service)
71+
* [angular-fullstack:value](#service)
72+
* [angular-fullstack:constant](#service)
73+
* [angular-fullstack:decorator](#decorator)
74+
* [angular-fullstack:view](#view)
75+
* [angular-fullstack:deploy](#deploy)
4176

4277
**Note: Generators are to be run from the root directory of your app.**
4378

@@ -46,15 +81,23 @@ Sets up a new AngularJS app, generating all the boilerplate you need to get star
4681

4782
Example:
4883
```bash
49-
yo angular
84+
yo angular-fullstack
85+
```
86+
87+
### Deploy
88+
Initalizes a heroku app and generates a `heroku` folder which is ready to push to heroku.
89+
90+
Example:
91+
```bash
92+
yo angular-fullstack:deploy heroku
5093
```
5194

5295
### Route
5396
Generates a controller and view, and configures a route in `app/scripts/app.js` connecting them.
5497

5598
Example:
5699
```bash
57-
yo angular:route myroute
100+
yo angular-fullstack:route myroute
58101
```
59102

60103
Produces `app/scripts/controllers/myroute.js`:
@@ -74,7 +117,7 @@ Generates a controller in `app/scripts/controllers`.
74117

75118
Example:
76119
```bash
77-
yo angular:controller user
120+
yo angular-fullstack:controller user
78121
```
79122

80123
Produces `app/scripts/controllers/user.js`:
@@ -88,7 +131,7 @@ Generates a directive in `app/scripts/directives`.
88131

89132
Example:
90133
```bash
91-
yo angular:directive myDirective
134+
yo angular-fullstack:directive myDirective
92135
```
93136

94137
Produces `app/scripts/directives/myDirective.js`:
@@ -109,7 +152,7 @@ Generates a filter in `app/scripts/filters`.
109152

110153
Example:
111154
```bash
112-
yo angular:filter myFilter
155+
yo angular-fullstack:filter myFilter
113156
```
114157

115158
Produces `app/scripts/filters/myFilter.js`:
@@ -126,7 +169,7 @@ Generates an HTML view file in `app/views`.
126169

127170
Example:
128171
```bash
129-
yo angular:view user
172+
yo angular-fullstack:view user
130173
```
131174

132175
Produces `app/views/user.html`:
@@ -149,14 +192,14 @@ angular.module('myMod').service('myService', function () {
149192
});
150193
```
151194

152-
You can also do `yo angular:factory`, `yo angular:provider`, `yo angular:value`, and `yo angular:constant` for other types of services.
195+
You can also do `yo angular-fullstack:factory`, `yo angular-fullstack:provider`, `yo angular-fullstack:value`, and `yo angular-fullstack:constant` for other types of services.
153196

154197
### Decorator
155198
Generates an AngularJS service decorator.
156199

157200
Example:
158201
```bash
159-
yo angular:decorator serviceName
202+
yo angular-fullstack:decorator serviceName
160203
```
161204

162205
Produces `app/scripts/decorators/serviceNameDecorator.js`:
@@ -177,7 +220,7 @@ For generators that output scripts, the `--coffee` option will output CoffeeScri
177220

178221
For example:
179222
```bash
180-
yo angular:controller user --coffee
223+
yo angular-fullstack:controller user --coffee
181224
```
182225

183226
Produces `app/scripts/controller/user.coffee`:
@@ -196,7 +239,7 @@ By default, generators produce unannotated code. Without annotations, AngularJS'
196239

197240
#### Example
198241
```bash
199-
yo angular:controller user --minsafe
242+
yo angular-fullstack:controller user --minsafe
200243
```
201244

202245
Produces `app/controller/user.js`:
@@ -236,7 +279,7 @@ By default, new scripts are added to the index.html file. However, this may not
236279

237280
To skip adding them to the index, pass in the skip-add argument:
238281
```bash
239-
yo angular:service serviceName --skip-add
282+
yo angular-fullstack:service serviceName --skip-add
240283
```
241284

242285
## Bower Components

0 commit comments

Comments
 (0)