Fixed linting errors and webpack config for redirect routes.

This commit is contained in:
Shane M. Clements 2016-04-09 10:39:55 -06:00
parent cbc58d2f11
commit a6be92448b
3 changed files with 6 additions and 5 deletions

View file

@ -20,7 +20,8 @@
"formatMessage": true
},
"ecmaFeatures": {
"jsx": true
"jsx": true,
"arrowFunctions": true
},
"plugins": [
"react"

View file

@ -3,7 +3,6 @@ var defaults = require('lodash.defaults');
var fs = require('fs');
var mustache = require('mustache');
var path = require('path');
var config = require('./config');
/**
@ -12,7 +11,7 @@ var config = require('./config');
function Handler (route) {
// Handle redirects
if (route.redirect) {
return (req, res) => res.redirect(route.redirect);
return (req, res) => { res.redirect(route.redirect); };
}
// Route definition

View file

@ -9,6 +9,7 @@ var entry = {
init: './src/init.js'
};
routes.forEach(function (route) {
if (!route.redirect)
entry[route.view] = './src/views/' + route.view + '/' + route.view + '.jsx';
});