JSCS Cleanup - karma.conf

JSCS cleanup for:
- openstack_dashboard/karma.conf.js
- horizon/karma.conf.js

Change-Id: I0c74187c86404b8b332eba6d1f7820f292bfa788
Partially-Implements: blueprint jscs-cleanup
This commit is contained in:
Rob Cresswell 2015-06-10 12:44:30 +01:00
parent bd80fb930b
commit de11d158aa
2 changed files with 18 additions and 17 deletions

View File

@ -1,23 +1,24 @@
'use strict';
var fs = require('fs');
var path = require('path');
module.exports = function(config){
module.exports = function(config) {
var xstaticPath;
var base_paths = [
var basePaths = [
'./.venv',
'./.tox/py27'
]
for( var i = 0; i < base_paths.length; i++) {
var base_path = path.resolve(base_paths[i]);
for (var i = 0; i < basePaths.length; i++) {
var basePath = path.resolve(basePaths[i]);
if( fs.existsSync(base_path) ) {
xstaticPath = base_path + '/lib/python2.7/site-packages/xstatic/pkg/';
if (fs.existsSync(basePath)) {
xstaticPath = basePath + '/lib/python2.7/site-packages/xstatic/pkg/';
break;
}
}
if( !xstaticPath) {
if (!xstaticPath) {
console.error("xStatic libraries not found, please set up venv");
process.exit(1);
}
@ -63,7 +64,6 @@ module.exports = function(config){
xstaticPath + 'spin/data/spin.js',
xstaticPath + 'spin/data/spin.jquery.js',
// from jasmine_tests.py; only those that are deps for others
'horizon/js/horizon.js',
'horizon/js/angular/hz.api.module.js',
@ -91,7 +91,7 @@ module.exports = function(config){
xstaticPath + 'magic_search/data/magic_search.js',
// TESTS
'**/*.spec.js',
'**/*.spec.js'
],
autoWatch : true,

View File

@ -1,23 +1,24 @@
'use strict';
var fs = require('fs');
var path = require('path');
module.exports = function(config){
module.exports = function(config) {
var xstaticPath;
var base_paths = [
var basePaths = [
'./.venv',
'./.tox/py27'
]
for( var i = 0; i < base_paths.length; i++) {
var base_path = path.resolve(base_paths[i]);
for (var i = 0; i < basePaths.length; i++) {
var basePath = path.resolve(basePaths[i]);
if( fs.existsSync(base_path) ) {
xstaticPath = base_path + '/lib/python2.7/site-packages/xstatic/pkg/';
if (fs.existsSync(basePath)) {
xstaticPath = basePath + '/lib/python2.7/site-packages/xstatic/pkg/';
break;
}
}
if( !xstaticPath) {
if (!xstaticPath) {
console.error("xStatic libraries not found, please set up venv");
process.exit(1);
}
@ -71,7 +72,7 @@ module.exports = function(config){
"dashboard/**/*.js",
// Templates.
'./**/*.html',
'./**/*.html'
],
autoWatch : true,