https://github.com/adambullmer/generator-angular-bro
Angular app scaffolding and build chain
https://github.com/adambullmer/generator-angular-bro
Last synced: 2 months ago
JSON representation
Angular app scaffolding and build chain
- Host: GitHub
- URL: https://github.com/adambullmer/generator-angular-bro
- Owner: adambullmer
- License: mit
- Created: 2016-03-25T06:55:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-21T05:36:49.000Z (almost 8 years ago)
- Last Synced: 2025-02-07T09:38:14.933Z (4 months ago)
- Language: JavaScript
- Size: 122 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generator Angular-Bro
Angular app scaffolding and build chain## Installation
First, install [Yeoman](http://yeoman.io) and generator-angular-bro using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).
```bash
npm install -g yo
npm install -g generator-angular-bro
```Then generate your new project:
```bash
yo angular-bro
```## Commands
Below is a list of commands and a brief description of what they do- `yo angular-bro` Shows a wizard for generating a new generator
- `yo angular-bro:module ` Generates a `module.js` file inside the module folder ``
- `yo angular-bro:template ` Generates a `template.html` file inside the module folder ``
- `yo angular-bro:controller ` Generates a `controller.js` file in the module folder `` along with the following things.
- `module.js` file
- Adds module imports and controller defintion on the module
- `yo angular-bro:directive `
- `template.html` for this module
- Template is included in the directive file
- `controller.js` for this module
- `module.js` file
- Adds the controller and directive definitions on the module
- `yo angular-bro:factory ` Generates a `factory.js` file in the module folder `` along with the following things.
- `module.js` file
- Adds the factory definitions on the module
- `yo angular-bro:provider ` Generates a `provider.js` file in the module folder `` along with the following things.
- `module.js` file
- Adds the provider definitions on the module
- `yo angular-bro:service `Generates a `service.js` file in the module folder `` along with the following things.
- `module.js` file
- Adds the service definitions on the module
- `yo angular-bro:state ` Generates a `state.js` file in the module folder `` along with the following things.
- `template.html` for this module
- Template is included in the state file
- `module.js` file
- Adds the state and controller definitions on the module
- `yo angular-bro:server` Generates a mock server in the root of your project
- Installs required npm dependencies. These are only dev dependencies and will not be included in the final application
- `yo angular-bro:mock ` Generates a mock for the relative path ``
- If you have a common api base path, you should omit it in the above command, and add it to the resulting file
- e.x. `/api/v1/users` should just be `/users` in the above command
- `yo angular-bro:proxy ` Generates a server proxy to send requests from `` to ``
- If you have a common api base path, you should omit it in the above command, and add it to the resulting file
- e.x. `/api/v1/users` should just be `/users` in the above command## Project Structure
```
.
├── app/
│ ├── app.js
│ ├── router.js
│ └── project-name.js
├── tests/
│ ├── e2e.js
│ ├── helpers
│ └── unit/
│ ├──
├── .jscsrc
├── bower.json
├── Brocfile.js
├── circle.yml
├── Gruntfile.js
├── index.html
├── karma.conf.js
└── package.json
```### Module-Related Generation
Angular-Bro has adopted a pod structure, or feature based structure, for better generation of files and tests.
Each file is a generic name describing it's purpose, inside of it's pod or feature name.```
.
├── app/
│ ├── a-module-name/
│ │ └── module.js
│ ├── a-template-name/
│ │ └── template.html
│ ├── example-controller/
│ │ ├── controller.js
│ │ └── module.js
│ ├── example-directive/
│ │ ├── controller.js
│ │ ├── directive.js
│ │ ├── module.js
│ │ └── template.html
│ ├── example-factory/
│ │ ├── factory.js
│ │ └── module.js
│ ├── example-provider/
│ │ ├── provider.js
│ │ └── module.js
│ ├── example-service/
│ │ ├── service.js
│ │ └── module.js
│ └── example-state/
│ ├── controller.js
│ ├── module.js
│ ├── state.js
│ └── template.html
└── tests/
└── unit/
├── a-module-name/
└── example-controller/```
### Server-Related Generation
Example directory sirectory structure of server-related generated files```
.
├── app/
└── server/
├── mocks/
│ ├── my-mock.js
│ └── my-other-mock.js
├── proxies/
│ ├── my-other-proxy.js
│ └── my-proxy.js
└── index.js
```