Make codeclimate a little happier

pull/4433/head
Alex Dik 9 years ago
parent 6043318a5e
commit e8adda8533
  1. 2
      frontend/app/init-app.js
  2. 2
      frontend/modules/config.js
  3. 4
      frontend/webpack-main-config.js
  4. 3
      frontend/webpack-test-config.js
  5. 7
      frontend/webpack.config.js

@ -71,7 +71,7 @@ opApp
function($locationProvider, $httpProvider) {
$locationProvider.html5Mode(true);
$httpProvider.defaults.headers.common['X-CSRF-TOKEN'] = jQuery(
'meta[name=csrf-token]').attr('content'); // TODO find a more elegant way to keep the session alive
'meta[name=csrf-token]').attr('content');
$httpProvider.defaults.headers.common['X-Authentication-Scheme'] = 'Session';
// prepend a given base path to requests performed via $http
//

@ -29,5 +29,5 @@
var path = require('path');
module.exports = {
frontendPath: path.resolve(__dirname, '..'),
frontendPath: path.resolve(__dirname, '..')
};

@ -90,7 +90,7 @@ loaders.push({
function getWebpackMainConfig() {
return {
context: __dirname + '/app',
context: path.join(__dirname, '/app'),
entry: _.merge({
'global': './global.js',
@ -135,7 +135,7 @@ function getWebpackMainConfig() {
},
resolveLoader: {
root: __dirname + '/node_modules'
root: path.join(__dirname, '/node_modules')
},
plugins: [

@ -26,6 +26,7 @@
// See doc/COPYRIGHT.rdoc for more details.
// ++
var path = require('path');
var getWebpackMainConfig = require('./webpack-main-config');
function getWebpackTestConfig() {
@ -33,7 +34,7 @@ function getWebpackTestConfig() {
webpackConfig.entry = './openproject-tests.js';
webpackConfig.output = {
path: __dirname + '/tests',
path: path.join(__dirname, '/tests'),
filename: 'openproject-test-bundle.js'
};

@ -26,7 +26,10 @@
// See doc/COPYRIGHT.rdoc for more details.
// ++
var getWebpackMainConfig = require('./webpack-main-config');
var getWebpackTestConfig = require('./webpack-test-config');
module.exports = [
require('./webpack-main-config')(),
require('./webpack-test-config')()
getWebpackMainConfig(),
getWebpackTestConfig()
];

Loading…
Cancel
Save