From b9f0e81e0ebd01d8825955d75de9438955909936 Mon Sep 17 00:00:00 2001 From: Cosmosquark Date: Thu, 10 May 2018 12:02:13 +0100 Subject: [PATCH 1/4] Fixed windows issue on loading the config file from index.js upon initialising the file from sequelize init --- src/helpers/init-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/init-helper.js b/src/helpers/init-helper.js index 70d52d11..c80f177a 100644 --- a/src/helpers/init-helper.js +++ b/src/helpers/init-helper.js @@ -67,7 +67,7 @@ const init = { helpers.asset.write( indexPath, helpers.template.render('models/index.js', { - configFile: '__dirname + \'/' + relativeConfigPath + '\'' + configFile: "path.join(__dirname,path.normalize(\'" + relativeConfigPath.replace(/\\/g,"/") + "\'))" }, { beautify: false }) From de1a75df9326ca9a57db59243f666ce7bf4acaa9 Mon Sep 17 00:00:00 2001 From: Cosmosquark Date: Thu, 10 May 2018 12:43:26 +0100 Subject: [PATCH 2/4] fixing string issue --- src/helpers/init-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/init-helper.js b/src/helpers/init-helper.js index c80f177a..5433046b 100644 --- a/src/helpers/init-helper.js +++ b/src/helpers/init-helper.js @@ -67,7 +67,7 @@ const init = { helpers.asset.write( indexPath, helpers.template.render('models/index.js', { - configFile: "path.join(__dirname,path.normalize(\'" + relativeConfigPath.replace(/\\/g,"/") + "\'))" + configFile: 'path.join(__dirname,path.normalize(\'' + relativeConfigPath.replace(/\\/g,'/') + '\'))' }, { beautify: false }) From dbddbd72d11fe6a8fc70b381f0ea1f3d64fa3322 Mon Sep 17 00:00:00 2001 From: Cosmosquark Date: Thu, 10 May 2018 12:44:35 +0100 Subject: [PATCH 3/4] added in spacer --- src/helpers/init-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/init-helper.js b/src/helpers/init-helper.js index 5433046b..fcc63fd4 100644 --- a/src/helpers/init-helper.js +++ b/src/helpers/init-helper.js @@ -67,7 +67,7 @@ const init = { helpers.asset.write( indexPath, helpers.template.render('models/index.js', { - configFile: 'path.join(__dirname,path.normalize(\'' + relativeConfigPath.replace(/\\/g,'/') + '\'))' + configFile: 'path.join(__dirname,path.normalize(\'' + relativeConfigPath.replace(/\\/g, '/') + '\'))' }, { beautify: false }) From fb2d74bb953ea34c6caa52880a1b303270193434 Mon Sep 17 00:00:00 2001 From: Cosmosquark Date: Thu, 10 May 2018 17:33:23 +0100 Subject: [PATCH 4/4] now just doing a simple swap of "/' --- src/helpers/init-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/init-helper.js b/src/helpers/init-helper.js index fcc63fd4..fcbf6fcb 100644 --- a/src/helpers/init-helper.js +++ b/src/helpers/init-helper.js @@ -67,7 +67,7 @@ const init = { helpers.asset.write( indexPath, helpers.template.render('models/index.js', { - configFile: 'path.join(__dirname,path.normalize(\'' + relativeConfigPath.replace(/\\/g, '/') + '\'))' + configFile: '__dirname + \'/' + relativeConfigPath.replace(/\\/g, '/') + '\'' }, { beautify: false })