mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Fixed linting errors and webpack config for redirect routes.
This commit is contained in:
parent
cbc58d2f11
commit
a6be92448b
3 changed files with 6 additions and 5 deletions
|
@ -20,7 +20,8 @@
|
|||
"formatMessage": true
|
||||
},
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
"jsx": true,
|
||||
"arrowFunctions": true
|
||||
},
|
||||
"plugins": [
|
||||
"react"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue