generator-anga v1.0.0-alpha2
aNGa generator
Yeoman generator for AngularJS project - does boring set up of the project for you.
ALPHA VERSION, NO STABLE VERSIONS
DON'T USE IT IN DEVELOPMENT TODAY, BUT START 'TOMORROW'!
Usage
Usage
Install generator-anga
:
npm install -g generator-anga
Make a new directory, and cd
into it:
mkdir my-new-project
cd my-new-project
Run yo anga
:
yo anga
Run grunt serve
for building and preview
Generators
Available generators:
Note: Generators are to be run from the root directory of your app.
App
Sets up a new AngularJS app, generating all the boilerplate you need to get started application.
Example:
yo anga
Mod
TODO
Generates a new module.
Example:
yo anga:mod
If created new module 'users' under 'system', then produces src/myapp/system/users/users-module.js
:
angular.module('myapp.system.users', []);
angular.module('myapp.system.users').config(function ($routeProvider) {
// ...
});
and changes src/myapp/system/system-module.js
adding new dependency:
angular.module('myapp.system', ['myapp.system.users']);
Add
Powerfull generator to add any kind of components. It also might be project-defined components predefined in project specific folder. You choose component and module where you want to add your component.
By default, some angular specific components exist separated by groups:
- directive ** ...
- singleton constant factory filter provider service value
- view ** ...
Example:
yo anga:add
Modcp
TODO
Copies module into new one.
Route
TODO
Configures a route into config function of the controller's module.
Example:
yo anga:route controllerName viewPath
or
yo anga:route ...ctrl={ControllerName}...view={ViewPath}
Changes controller's module configurations in src/myapp/system/users/users-module.js
:
...
angular.module('myapp.system.users').config(function ($routeProvider) {
$routeProvider
.when('/users', {
templateUrl: '/templates/myapp/system/users/userList.html',
controller: 'myapp.system.users.UserListCtrl'
})
});
...
Mock
TODO
Creates mock api to test your app locally.
11 years ago
11 years ago