Conform project and config files to coding convention

This commit is contained in:
Frédéric Vachon 2015-01-15 16:56:37 -05:00
parent 16f55b012f
commit 6ec305ea9f
18 changed files with 65 additions and 75 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ tmp
*.swp
app/assets/css
.sass-cache/
out/

View File

@ -1,6 +1,10 @@
'use strict';
module.exports = function(grunt) {
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jslint');
grunt.initConfig({
@ -12,7 +16,6 @@ module.exports = function(grunt) {
css: ['<%= project.assets %>/sass/app.scss']
},
sass: {
dev: {
options: {
@ -20,7 +23,7 @@ module.exports = function(grunt) {
compass: false
},
files: {
'<%= project.assets %>/css/app.css':'<%= project.css %>'
'<%= project.assets %>/css/app.css' : '<%= project.css %>'
}
}
},
@ -32,41 +35,39 @@ module.exports = function(grunt) {
}
},
jslint: { // configure the task
jslint: { // configure the task
client: {
src: [
'app/app.js',
'app/**/*.js'
],
exclude: [
'app/bower_components/**/*.js',
'app/assets/**/*'
],
directives: { // example directives
node: true,
todo: true
},
options: {
edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path
junit: 'out/client-junit.xml', // write the output to a JUnit XML
log: 'out/client-lint.log',
jslintXml: 'out/client-jslint.xml',
errorsOnly: true, // only display errors
failOnError: false, // defaults to true
checkstyle: 'out/client-checkstyle.xml' // write a checkstyle-XML
}
client: {
src: [
'karma.conf.js',
'Gruntfile.js',
'app/app.js',
'app/**/*.js'
],
exclude: [
'app/bower_components/**/*.js',
'app/assets/**/*'
],
directives: {
node: true,
unparam: true, // TEMPORARY: Ignore unused params
predef: [ // Global variables
'angular', 'inject', 'JustGage',
'describe', 'beforeEach', 'it', 'expect'
]
},
options: {
edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path
junit: 'out/client-junit.xml', // write the output to a JUnit XML
log: 'out/client-lint.log',
jslintXml: 'out/client-jslint.xml',
errorsOnly: true, // only display errors
failOnError: false, // defaults to true
checkstyle: 'out/client-checkstyle.xml' // write a checkstyle-XML
}
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jslint');
grunt.registerTask('default', 'jslint');
grunt.registerTask('default', [
'watch'
]);
grunt.registerTask('default', [ 'watch', 'jslint' ]);
};

View File

@ -1,4 +1,3 @@
/*global angular*/
'use strict';
angular.module('adagios', [

View File

@ -1,4 +1,3 @@
/*global angular*/
'use strict';
angular.module('adagios.live', [])

View File

@ -1,4 +1,3 @@
/*global angular, JustGage*/
'use strict';
angular.module("ngJustGage", [])

View File

@ -1,10 +1,9 @@
/*global angular*/
'use strict';
angular.module('adagios.navbar', ['adagios.live'])
.controller('NavBarCtrl', ['$scope', '$http', 'GetProblems', function ($scope, $http, GetProblems) {
$scope.notifications = GetProblems;
$scope.notifications = GetProblems;
}])
.directive('navbar', function () {

View File

@ -1,4 +1,3 @@
/*global describe, beforeEach, it, inject, expect*/
'use strict';
describe('Navbar module', function () {

View File

@ -1,10 +1,9 @@
/*global angular*/
'use strict';
angular.module('adagios.sidebar', [])
.controller('SideBarCtrl', ['$scope', '$http', function ($scope, $http) {
return;
}])
.directive('sidebar', function () {

View File

@ -1,4 +1,3 @@
/*global describe, beforeEach, it, inject, expect*/
'use strict';
describe('Sidebar module', function () {

View File

@ -1,4 +1,3 @@
/*global angular*/
'use strict';
angular.module('adagios.tactical.current_health', ['ngRoute', 'ngJustGage' ])

View File

@ -1,4 +1,3 @@
/*global describe, beforeEach, it, inject, expect*/
'use strict';
describe('Current Health tactical submodule', function () {

View File

@ -1,4 +1,3 @@
/*global angular*/
'use strict';
angular.module('adagios.tactical.status_overview', ['ngRoute' ])

View File

@ -1,4 +1,3 @@
/*global describe, beforeEach, it, inject, expect*/
'use strict';
describe('Status Overview tactical submodule', function () {

View File

@ -1,4 +1,3 @@
/*global angular*/
'use strict';
angular.module('adagios.tactical', ['ngRoute',
@ -15,4 +14,5 @@ angular.module('adagios.tactical', ['ngRoute',
}])
.controller('TacticalCtrl', ['$scope', '$http', function ($scope, $http) {
return;
}]);

View File

@ -1,4 +1,3 @@
/*global describe, beforeEach, it, inject, expect*/
'use strict';
describe('Tactical module', function () {

View File

@ -1,4 +1,3 @@
/*global angular*/
'use strict';
angular.module('adagios.tactical.top_alert_producers', ['ngRoute' ])

View File

@ -1,4 +1,3 @@
/*global describe, beforeEach, it, inject, expect*/
'use strict';
describe('Top Alert Producer tactical submodule', function () {

View File

@ -1,35 +1,37 @@
module.exports = function(config){
config.set({
'use strict';
basePath : './',
module.exports = function (config) {
config.set({
files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/components/**/*.js',
'app/navbar/**/*.js',
'app/sidebar/**/*.js',
'app/tactical/**/*.js',
],
basePath : './',
autoWatch : true,
files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/components/**/*.js',
'app/navbar/**/*.js',
'app/sidebar/**/*.js',
'app/tactical/**/*.js'
],
frameworks: ['jasmine'],
autoWatch : true,
browsers : ['Chrome'],
frameworks: ['jasmine'],
plugins : [
browsers : ['Chrome'],
plugins : [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-junit-reporter'
],
],
junitReporter : {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
junitReporter : {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
});
});
};