const path = require('path');
const appModulePath = require('app-module-path');

appModulePath.addPath(path.join(__dirname, '../src'));
appModulePath.addPath(path.join(__dirname, '../src/main'));

const appRoutes = require('settings/routes/app-routes');

const jobRoutesList = require('settings/routes/job-routes-list');

const excludeRoutes = [];

let prerenderedRoutes = [];

const hook = {
	['nous-rejoindre']: function () {
		prerenderedRoutes.push('/nous-rejoindre');
		jobRoutesList.forEach(route => {
			prerenderedRoutes.push('/nous-rejoindre/'+route);
		})
	}
}

appRoutes.filter(route => ( excludeRoutes.indexOf(route.name) === -1 )
).forEach(route => {
	hook[route.name] ? hook[route.name](route.path) : prerenderedRoutes.push(route.path);
});

module.exports = prerenderedRoutes;
@@ -313,16 +313,90 @@
 -list');
+%0Aconst careersRoutesList = require('settings/routes/careers-routes-list');
 %0A%0Aconst 
@@ -633,16 +633,170 @@
 );%0A%09%09%7D)%0A
+%09%7D,%0A%09%5B'carriere'%5D: function () %7B%0A%09%09prerenderedRoutes.push('/carriere');%0A%09%09careersRoutesList.forEach(route =%3E %7B%0A%09%09%09prerenderedRoutes.push('/'+route);%0A%09%09%7D)%0A
 %09%7D%0A%7D%0A%0Aap

add careers to prerendered routes