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) { function($locationProvider, $httpProvider) {
$locationProvider.html5Mode(true); $locationProvider.html5Mode(true);
$httpProvider.defaults.headers.common['X-CSRF-TOKEN'] = jQuery( $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'; $httpProvider.defaults.headers.common['X-Authentication-Scheme'] = 'Session';
// prepend a given base path to requests performed via $http // prepend a given base path to requests performed via $http
// //

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

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

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

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

Loading…
Cancel
Save