Adds the first working grunt build aimed for deployment on production.

TL;DR : everything but CSS is minified and packed in a neat dist/ directory.

This build :
- Merges all vendor dependencies (jquery, angular, etc) into one minified file.
- Merges the non-bower vendor dependencies (UnityShim, jquery-split-pane, etc). into one minified file.
- Merges all our javascript into one minified file.
- Copies all the needed CSS (couldn't minify and rename it because of dependencies in the JS).
- Renames all the images, the minified javascripts (but not the CSS) in order to avoid browser caching.
- Minifies all our html files.

Adds usemin commentaries (the ones with build) to index.html. Don't remove them or the build will break.

Renames the json files to .json so the build can find them and copy them.

Corrects all the angular-injectable functions to use the long form (with the array) in order to be minified. The build should also do that now with ng-Annotate but since I did it when debugging problems with the build, might as well keep it.

Note: the grunt test target is broken. Haven't figured out why yet.

Conflicts:
	app/app.js
	app/common/directives.js
	app/index.html
	app/settings/settings.js
This commit is contained in:
Hyzual 2014-11-08 21:34:24 +01:00
parent 696c51a64c
commit 1fb70ea5ec
22 changed files with 175 additions and 154 deletions

View file

@ -1,11 +1,10 @@
'use strict';
angular.module('JamStash')
var jamstash = angular.module('JamStash');
jamstash.controller('QueueCtrl',
function QueueCtrl($scope, $rootScope, $routeParams, $location, utils, globals, json, notifications) {
.controller('QueueCtrl', ['$scope', '$rootScope', '$routeParams', '$location', 'utils', 'globals',
function QueueCtrl($scope, $rootScope, $routeParams, $location, utils, globals) {
'use strict';
$scope.settings = globals.settings;
$scope.song = $rootScope.queue;
//angular.copy($rootScope.queue, $scope.song);
$scope.itemType = 'pl';
});
}]);