generator-siq-module
v0.1.4
Published
SwiftIQ Module Generator
Downloads
2
Maintainers
Readme
generator-siq-module
Yeoman Angular.js Bower Module Generator
Usage
$ npm install -g generator-siq-module
from your desired module directory...
$ yo siq-module
$ bower init
To link bower deps to this local repo
$ bower link
To initialize livereload for development
$ grunt dev
To create a deployable artifact
$ grunt
Grunt tasks
The following tasks are run, in order, by $ grunt
and $grunt dev
:
- clean - clear out any existing tmp or release files
- ngTemplates - convert all HTML templates to
$templateCache
strings - less - compile LESS to CSS
- cssmin - minify CSS
- concat - concatenate all generated javascript files
- ngAnnotate - convert all javascript files to Angular.js minsafe syntax
- uglify - uglify/minify javascript
- clean - remove temporary files
Available module types:
- module (run/config only)
- directive (options to include template and controller)
- controller
- partial/template (includes LESS, option to include controller)
- service
- factory
- filter
- provider
- constant
- value
All module types include an angular module. providers, services and factories will automatically be injected into the module's run statement. If the module type is provider, the providerProvider will be injected into the config block.
Directory Structure:
bower.json
package.json
Gruntfile.js
.gitignore
|- release
| <module-name>.min.js
| <module-name>.min.css
|- src
<module-name>.js
|- directive
| <module-name>.js
|- controller
| <module-name>.js
|- partial
| <module-name>.html
| <module-name>.less
|- service
| <module-name>.js
|- factory
| <module-name>.js
|- filter
| <module-name>.js
|- provider
| <module-name>.js
|- constant
| <module-name>.js
|- value
<module-name>.js
ToDo
- Convert all templates to sub-generators to allow for subsequent module-type creation
- Add unit tests