zfcampus/zf-apigility-admin — pull request #92 by intellix (2014-02-04 08:50:49+00:00)
Title: [WIP] Feature/bower process

So I've gone through the apigility project and have made changes to the build/development process to make things easier, automated.

JS/CSS are declared and processed using grunt-contrib-usemin inside index.html, as shown on IRC earlier. Getting this to work was a bit of a nightmare due to the AssetManager and Grunt not talking about directories from the same relative point. I've fixed this by altering app.phtml but it's not a clean solution right now.

The whole thing works, you work with the /src version of the project with "grunt serve" which will create a livereload listener and start watching for changes. You can listen to livereload with something like: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei

When you're ready to create a build, you just "grunt build" or if you want to include jshint and tests as well: "grunt"'. I've added additional jshint rules and then eased them as it failed miserably. The unit tests is also something I need to check as I just copied the same structure from another project of mine but not tried them yet.

Right now it seems ngMin is having issues processing _declarations.js as there are references to Services which aren't injected in the normal way. These guys say they should be moved to a service and injected in to rectify it: https://github.com/btford/ngmin/issues/23

If you want to check it out, change $version to 'src' inside app.phtml and "grunt serve". See what you think.