Offers you a Yeoman generator to initiate a Web application with the following workflow:
This generator aims to takes the best from others generators like generator-angular, ngTailor and generator-gulp-webapp to offers the best workflow to start an application with AngularJS powered by Gulp!
generator-gulp-angular scaffolds out an Angularjs application with a full featured gulpfile.js wich offers all the tasks for a modern Web development.
Install generator-gulp-angular
:
npm install -g generator-gulp-angular
Make a new directory, and cd
into it:
mkdir my-new-project && cd $_
Run yo gulp-angular
, optionally passing an app name:
yo gulp-angular [app-name]
gulp
orgulp build
to build an optimized version of your application in/dist
gulp watch
to launch a server with livereload capacities on your source filesgulp serve:dist
to launch a server on your optimized applicationgulp wiredep
to fill bower dependencies in your.html
file(s)gulp test
to launch your unit tests with Karmagulp protractor
to launch your e2e tests with Protractorgulp protractor:dist
to launch your e2e tests with Protractor on the dist files
Best Practice Recommendations for Angular App Structure
But I think keeping first division by file type: scripts, styles, partials.
- useref
- ngMin
- uglify
- csso
- rev
- watch
- connect
- jshint
- image optimization
- Unit test (karma)
- e2e test (Protratctor)
- ng html2js
- TODO lazy
- TODO browser sync
- jQuery: jQuery, Zepto, none
- Angular modules: animate, cookies, touch, sanitize
- Resource handler: ngResource, Restangular, none.
- Router: ngRoute, UI Router, none.
- TODO CSS Framework: Bootstrap, SemanticUI, Fondation, None. (Will be impacted by the CSS preprocessor chosen)
- TODO CSS preprocessor: less, sass, none
- TODO JS preprocessor: CoffeeScript, TypeScript, ECMAScript6 (Traceur)
- TODO HTML preprocessor: Jade ?
- TODO Script loader: Require, Browserify, ES6 with Require?, none
- TODO Test framework: Jasmine, Mocha, Qunit
- Convert HTML templates into JS and add them into the optimized bundle
- Let you choose to use jQuery, Zepto or nothing (Angular's jqLite)
- Ask for optional Angular modules: animate cookies, touch and sanitize
- Resource handler: ngResource, Restangular, none.
- Router: ngRoute, UI Router, none.
- Adding Travis CI
- Add unit test with karma and e2e test with protractor
- Split gulp configuration in multiple files
- Create 'inception' test which generate files and try gulp tasks on it
- Add ability to serve dist files and run e2e test on dist files
- Still no options
- Initial commit
- Scaffolds a working directory but with no options and no tests
MIT