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 *.swp
app/assets/css app/assets/css
.sass-cache/ .sass-cache/
out/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,35 +1,37 @@
module.exports = function(config){ 'use strict';
config.set({
basePath : './', module.exports = function (config) {
config.set({
files : [ basePath : './',
'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',
],
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-chrome-launcher',
'karma-firefox-launcher', 'karma-firefox-launcher',
'karma-jasmine', 'karma-jasmine',
'karma-junit-reporter' 'karma-junit-reporter'
], ],
junitReporter : { junitReporter : {
outputFile: 'test_out/unit.xml', outputFile: 'test_out/unit.xml',
suite: 'unit' suite: 'unit'
} }
}); });
}; };