Skip to content

Commit 60b23bf

Browse files
committed
docs(readme): move gen docs to docs folder
remove subgenerator docs, change links to link to `/docs/generators/xxx.md` [skip ci]
1 parent 5d9b2ed commit 60b23bf

File tree

1 file changed

+12
-273
lines changed

1 file changed

+12
-273
lines changed

readme.md

Lines changed: 12 additions & 273 deletions
Original file line numberDiff line numberDiff line change
@@ -83,282 +83,21 @@ A grunt/gulp task looks for new files in your `client/app` and `client/component
8383
Available generators:
8484

8585
* App
86-
- [angular-fullstack](#app) (aka [angular-fullstack:app](#app))
86+
- [angular-fullstack](/docs/generators/app.md) (aka [angular-fullstack:app](/docs/generators/app.md))
8787
* Server Side
88-
- [angular-fullstack:endpoint](#endpoint)
88+
- [angular-fullstack:endpoint](/docs/generators/endpoint.md)
8989
* Client Side
90-
- [angular-fullstack:route](#route)
91-
- [angular-fullstack:controller](#controller)
92-
- [angular-fullstack:filter](#filter)
93-
- [angular-fullstack:directive](#directive)
94-
- [angular-fullstack:service](#service)
95-
- [angular-fullstack:provider](#service)
96-
- [angular-fullstack:factory](#service)
97-
- [angular-fullstack:decorator](#decorator)
90+
- [angular-fullstack:route](/docs/generators/route.md)
91+
- [angular-fullstack:controller](/docs/generators/controller.md)
92+
- [angular-fullstack:filter](/docs/generators/filter.md)
93+
- [angular-fullstack:directive](/docs/generators/directive.md)
94+
- [angular-fullstack:service](/docs/generators/service.md)
95+
- [angular-fullstack:provider](/docs/generators/service.md)
96+
- [angular-fullstack:factory](/docs/generators/service.md)
97+
- [angular-fullstack:decorator](/docs/generators/decorator.md)
9898
* Deployment
99-
- [angular-fullstack:openshift](#openshift)
100-
- [angular-fullstack:heroku](#heroku)
101-
102-
### App
103-
Sets up a new AngularJS + Express app, generating all the boilerplate you need to get started.
104-
105-
Usage:
106-
```bash
107-
Usage:
108-
yo angular-fullstack:app [options] [<name>]
109-
110-
Options:
111-
-h, --help # Print the generator's options and usage
112-
--skip-cache # Do not remember prompt answers Default: false
113-
--skip-install # Do not install dependencies Default: false
114-
--app-suffix # Allow a custom suffix to be added to the module name Default: App
115-
116-
Arguments:
117-
name Type: String Required: false
118-
```
119-
120-
Example:
121-
```bash
122-
yo angular-fullstack
123-
```
124-
125-
### Endpoint
126-
Generates a new API endpoint.
127-
128-
Usage:
129-
```bash
130-
Usage:
131-
yo angular-fullstack:endpoint [options] <name>
132-
133-
Options:
134-
-h, --help # Print the generator's options and usage
135-
--skip-cache # Do not remember prompt answers Default: false
136-
--route # URL for the endpoint
137-
--models # Specify which model(s) to use Options: mongoose, sequelize
138-
--endpointDirectory # Parent directory for enpoints
139-
140-
Arguments:
141-
name Type: String Required: true
142-
```
143-
144-
Example:
145-
```bash
146-
yo angular-fullstack:endpoint message
147-
[?] What will the url of your endpoint be? /api/messages
148-
```
149-
150-
Produces:
151-
152-
server/api/message/index.js
153-
server/api/message/index.spec.js
154-
server/api/message/message.controller.js
155-
server/api/message/message.integration.js
156-
server/api/message/message.model.js (optional)
157-
server/api/message/message.events.js (optional)
158-
server/api/message/message.socket.js (optional)
159-
160-
### Route
161-
Generates a new route.
162-
163-
Example:
164-
```bash
165-
yo angular-fullstack:route myroute
166-
[?] What module name would you like to use? myApp
167-
[?] Where would you like to create this route? client/app/
168-
[?] What will the url of your route be? /myroute
169-
```
170-
171-
Produces:
172-
173-
client/app/myroute/myroute.js
174-
client/app/myroute/myroute.controller.js
175-
client/app/myroute/myroute.controller.spec.js
176-
client/app/myroute/myroute.html
177-
client/app/myroute/myroute.scss
178-
179-
180-
### Controller
181-
Generates a controller.
182-
183-
Example:
184-
```bash
185-
yo angular-fullstack:controller user
186-
[?] Where would you like to create this controller? client/app/
187-
```
188-
189-
Produces:
190-
191-
client/app/user/user.controller.js
192-
client/app/user/user.controller.spec.js
193-
194-
### Directive
195-
Generates a directive.
196-
197-
Example:
198-
```bash
199-
yo angular-fullstack:directive myDirective
200-
[?] Where would you like to create this directive? client/app/
201-
[?] Does this directive need an external html file? Yes
202-
```
203-
204-
Produces:
205-
206-
client/app/myDirective/myDirective.directive.js
207-
client/app/myDirective/myDirective.directive.spec.js
208-
client/app/myDirective/myDirective.html
209-
client/app/myDirective/myDirective.scss
210-
211-
**Simple directive without an html file**
212-
213-
Example:
214-
```bash
215-
yo angular-fullstack:directive simple
216-
[?] Where would you like to create this directive? client/app/
217-
[?] Does this directive need an external html file? No
218-
```
219-
220-
Produces:
221-
222-
client/app/simple/simple.directive.js
223-
client/app/simple/simple.directive.spec.js
224-
225-
### Filter
226-
Generates a filter.
227-
228-
Example:
229-
```bash
230-
yo angular-fullstack:filter myFilter
231-
[?] Where would you like to create this filter? client/app/
232-
```
233-
234-
Produces:
235-
236-
client/app/myFilter/myFilter.filter.js
237-
client/app/myFilter/myFilter.filter.spec.js
238-
239-
### Service
240-
Generates an AngularJS service.
241-
242-
Example:
243-
```bash
244-
yo angular-fullstack:service myService
245-
[?] Where would you like to create this service? client/app/
246-
```
247-
248-
Produces:
249-
250-
client/app/myService/myService.service.js
251-
client/app/myService/myService.service.spec.js
252-
253-
254-
You can also do `yo angular-fullstack:factory` and `yo angular-fullstack:provider` for other types of services.
255-
256-
### Decorator
257-
Generates an AngularJS service decorator.
258-
259-
Example:
260-
```bash
261-
yo angular-fullstack:decorator serviceName
262-
[?] Where would you like to create this decorator? client/app/
263-
```
264-
265-
Produces
266-
267-
client/app/serviceName/serviceName.decorator.js
268-
269-
###Openshift
270-
271-
> Note: Openshift uses a quite old version of Node by default. We strongly recommend updating your Node version. [Here's a helpful article](https://blog.openshift.com/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style/).
272-
273-
Deploying to OpenShift can be done in just a few steps:
274-
275-
yo angular-fullstack:openshift
276-
277-
A live application URL will be available in the output.
278-
279-
> **oAuth**
280-
>
281-
> If you're using any oAuth strategies, you must set environment variables for your selected oAuth. For example, if we're using Facebook oAuth we would do this :
282-
>
283-
> rhc set-env FACEBOOK_ID=id -a my-openshift-app
284-
> rhc set-env FACEBOOK_SECRET=secret -a my-openshift-app
285-
>
286-
> You will also need to set `DOMAIN` environment variable:
287-
>
288-
> rhc set-env DOMAIN=<your-openshift-app-name>.rhcloud.com
289-
>
290-
> # or (if you're using it):
291-
>
292-
> rhc set-env DOMAIN=<your-custom-domain>
293-
>
294-
> After you've set the required environment variables, restart the server:
295-
>
296-
> rhc app-restart -a my-openshift-app
297-
298-
To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control).
299-
300-
**Pushing Updates**
301-
302-
grunt
303-
304-
Commit and push the resulting build, located in your dist folder:
305-
306-
grunt buildcontrol:openshift
307-
308-
### Heroku
309-
310-
Deploying to heroku only takes a few steps.
311-
312-
yo angular-fullstack:heroku
313-
314-
To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder.
315-
316-
317-
If you're using mongoDB you will need to add a database to your app:
318-
319-
heroku addons:create mongolab
320-
321-
Note: if you get an `Error: No valid replicaset instance servers found` you need to modify moongose connection options in config/environment/production.js as follows:
322-
```
323-
options: {
324-
db: {
325-
safe: true,
326-
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
327-
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }
328-
}
329-
}
330-
```
331-
One of the odd things about the Node driver is that the default timeout for replica set connections is only 1 second, so make sure you're setting it to something more like 30s like in this example.
332-
333-
334-
Your app should now be live. To view it run `heroku open`.
335-
336-
>
337-
> If you're using any oAuth strategies, you must set environment variables for your selected oAuth. For example, if we're using **Facebook** oAuth we would do this :
338-
>
339-
> heroku config:set FACEBOOK_ID=id
340-
> heroku config:set FACEBOOK_SECRET=secret
341-
>
342-
> You will also need to set `DOMAIN` environment variable:
343-
>
344-
> heroku config:set DOMAIN=<your-heroku-app-name>.herokuapp.com
345-
>
346-
> # or (if you're using it):
347-
>
348-
> heroku config:set DOMAIN=<your-custom-domain>
349-
>
350-
351-
> WARNING: Deployment is untested with Gulp
352-
353-
To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control).
354-
355-
#### Pushing Updates
356-
357-
grunt
358-
359-
Commit and push the resulting build, located in your dist folder:
360-
361-
grunt buildcontrol:heroku
99+
- [angular-fullstack:openshift](/docs/generators/openshift.md)
100+
- [angular-fullstack:heroku](/docs/generators/heroku.md)
362101

363102

364103
## Bower Components

0 commit comments

Comments
 (0)