generator-ajsweb
v1.7.5
Published
Yeoman Gulp generator for AngularJS Web Application
Downloads
24
Maintainers
Readme
generator-ajsweb
Yeoman Gulp generator for AngularJS Web Application
Installation
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
List generators
yo --generators
Make project
Help
yo ajsweb --help
Then generate your new project:
yo ajsweb
Getting To Know Yeoman
- 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.
Usage
Make a new directory, and cd
into it:
mkdir project && cd project
Run yo ajsweb
, optionally passing an app name:
yo ajsweb [project-name]
Build develop mode
Make build directory with full application
gulp build
Dist production mode
Make dist directory with minimal application for production
gulp dist
Preview
Build preview (only for develop)
gulp serve
Dist preview (only for production)
gulp serve:dist
Test
Console
gulp test
Coverage
Check coverage directory
Preview
gulp serve:test
Clean
gulp clean
Docs
gulp docs
Generators
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
App
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
Route
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
Controller
Generates a controller in app/scripts/controllers
.
Example:
yo ajsweb:controller --help
yo ajsweb:controller controller-name
View
Generates an HTML view file in app/views
.
Example:
yo ajsweb:view --help
yo ajsweb:view view-name
Directive
Generates a directive in app/scripts/directives
.
Example:
yo ajsweb:directive --help
yo ajsweb:directive directive-name
Filter
Generates a filter in app/scripts/filters
.
Example:
yo ajsweb:filter --help
yo ajsweb:filter filter-name
Service
Generates an AngularJS service in app/scripts/services
.
Example:
yo ajsweb:service --help
yo ajsweb:service service-name
Provider
Generates an AngularJS provider in app/scripts/services
.
Example:
yo ajsweb:provider --help
yo ajsweb:provider provider-name
Factory
Generates an AngularJS factory in app/scripts/services
.
Example:
yo ajsweb:factory --help
yo ajsweb:factory factory-name
Value
Generates an AngularJS value in app/scripts/services
.
Example:
yo ajsweb:value --help
yo ajsweb:value value-name
Constant
Generates an AngularJS constant in app/scripts/services
.
Example:
yo ajsweb:constant --help
yo ajsweb:constant constant-name
Decorator
Generates an AngularJS service decorator in app/scripts/decorators
.
Example:
yo ajsweb:decorator --help
yo ajsweb:decorator service-name
Component
Generates an AngularJS component in app/scripts/components
.
Example:
yo ajsweb:component --help
yo ajsweb:component component-name
License
GPL-3.0 © Yadickson Soto