Yeoman Gulp generator for AngularJS Web Application
First, install Yeoman and generator-ajsweb using npm (we assume you have pre-installed node.js).
Simply run a global install using your terminal and you're good to go!
npm install -g yo generator-ajsweb
yo --generators
Help
yo ajsweb --help
Then generate your new project:
yo ajsweb
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
Make a new directory, and cd
into it:
mkdir project && cd project
Run yo ajsweb
, optionally passing an app name:
yo ajsweb [project-name]
Make build directory with full application
gulp build
Make dist directory with minimal application for production
gulp dist
Build preview (only for develop)
gulp serve
Dist preview (only for production)
gulp serve:dist
Console
gulp test
Coverage
Check coverage directory
Preview
gulp serve:test
gulp clean
gulp docs
Available generators:
- ajsweb (aka ajsweb:app)
- ajsweb:route
- ajsweb:controller
- ajsweb:view
- ajsweb:directive
- ajsweb:filter
- ajsweb:service
- ajsweb:provider
- ajsweb:factory
- ajsweb:value
- ajsweb:constant
- ajsweb:decorator
- ajsweb:component
Sets up a new AngularJS app, generating all the boilerplate you need to get started. The app generator also optionally installs Bootstrap and additional AngularJS modules, such as angular-ui-router (installed by default).
Example:
yo ajsweb --help
yo ajsweb project
Generates a controller and view, and configures a route in app/scripts/main_cfg.js
connecting them.
Example:
yo ajsweb:route --help
yo ajsweb:route route-name
Generates a controller in app/scripts/controllers
.
Example:
yo ajsweb:controller --help
yo ajsweb:controller controller-name
Generates an HTML view file in app/views
.
Example:
yo ajsweb:view --help
yo ajsweb:view view-name
Generates a directive in app/scripts/directives
.
Example:
yo ajsweb:directive --help
yo ajsweb:directive directive-name
Generates a filter in app/scripts/filters
.
Example:
yo ajsweb:filter --help
yo ajsweb:filter filter-name
Generates an AngularJS service in app/scripts/services
.
Example:
yo ajsweb:service --help
yo ajsweb:service service-name
Generates an AngularJS provider in app/scripts/services
.
Example:
yo ajsweb:provider --help
yo ajsweb:provider provider-name
Generates an AngularJS factory in app/scripts/services
.
Example:
yo ajsweb:factory --help
yo ajsweb:factory factory-name
Generates an AngularJS value in app/scripts/services
.
Example:
yo ajsweb:value --help
yo ajsweb:value value-name
Generates an AngularJS constant in app/scripts/services
.
Example:
yo ajsweb:constant --help
yo ajsweb:constant constant-name
Generates an AngularJS service decorator in app/scripts/decorators
.
Example:
yo ajsweb:decorator --help
yo ajsweb:decorator service-name
Generates an AngularJS component in app/scripts/components
.
Example:
yo ajsweb:component --help
yo ajsweb:component component-name
GPL-3.0 © Yadickson Soto