react-route-generator
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -9,3 +9,3 @@ "use strict"; | ||
const generateRouteCreatorFile_1 = __importDefault(require("./generateRouteCreatorFile")); | ||
const generateUrlDefaultFile_1 = __importDefault(require("./generateUrlDefaultFile")); | ||
const fs_1 = require("fs"); | ||
function generateAppRoutes(app) { | ||
@@ -15,5 +15,5 @@ const { routes, routingType, destinationDir, routeLinkCreators, generateUrlFunctionPath, shouldGenerateLink, shouldGenerateReactRouterFunctions, } = config_1.parseAppConfig(app); | ||
const routeCreator = `./utils/create${routingType}Route`; | ||
const utilsFolder = destinationDir.concat('/', '/utils'); | ||
const utilsFolder = destinationDir.concat('/', 'utils'); | ||
fs_1.mkdirSync(utilsFolder, { recursive: true }); | ||
Object.entries(routes).forEach(([routeName, routePattern]) => generateRouteFile_1.default({ routeName, routePattern, routeCreator, destinationDir })); | ||
generateUrlDefaultFile_1.default(utilsFolder); | ||
generateRouteCreatorFile_1.default({ | ||
@@ -20,0 +20,0 @@ routingType, |
{ | ||
"name": "react-route-generator", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "Route generator", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
39153
50
521
6