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