Skip to content

Commit

Permalink
Fixed: path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
we-abhijeet-g001 committed Mar 19, 2024
1 parent 4c4f4e6 commit 3ab0231
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/commands/cms/crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ export default class CmsCrud extends Command {
this.inputs.for = this.primary.for;

let target = "";
let source = '\\skeletons\\vaahcms\\crud\\';
let source = '/skeletons/vaahcms/crud/';
this.inputs['namespace_controller'] = '';

if(this.inputs.for == 'Module - Vue3 & PrimeVue')
{
source = '\\skeletons\\vaahcms\\crud-vue3\\';
source = '/skeletons/vaahcms/crud-vue3/';
this.inputs['namespace'] = 'VaahCms\\Modules\\'+this.inputs.folder_name;
target = "./VaahCms/Modules/"+this.inputs.folder_name;

} else if(this.inputs.for == 'Module - Vue2 & Buefy'){

source = '\\skeletons\\vaahcms\\crud\\';
source = '/skeletons/vaahcms/crud/';
this.inputs['namespace'] = 'VaahCms\\Modules\\'+this.inputs.folder_name;
target = "./VaahCms/Modules/"+this.inputs.folder_name;

Expand All @@ -95,7 +95,7 @@ export default class CmsCrud extends Command {
this.inputs['namespace'] = 'VaahCms\\Themes\\'+this.inputs.folder_name;
target = "./VaahCms/Themes/"+this.inputs.folder_name;
} else{
source = '\\skeletons\\vaahcms\\crud-vue3\\';
source = '/skeletons/vaahcms/crud-vue3/';
this.inputs['namespace_controller'] = this.inputs['namespace']+'\\Http\\Controllers';
target = this.inputs.path;
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/cms/m.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export default class CmsM extends Command {

if(this.inputs['module-type'] === 'Module - Vue3 & PrimeVue')
{
source = '\\skeletons\\vaahcms\\module-vue3\\';
source = '/skeletons/vaahcms/module-vue3/';
} else{
source = '\\skeletons\\vaahcms\\module\\';
source = '/skeletons/vaahcms/module/';
}

let target = "./VaahCms/Modules/"+this.inputs.module_name;
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export default class Generator {
//-- destination path
destination = this.getFileDestination(file_path);

file_readable_path = __dirname+"./../../skeletons/"+file_path;
file_readable_path = __dirname+"/../../skeletons/"+file_path;

file_content = fs.readFileSync(file_readable_path).toString();

Expand Down

0 comments on commit 3ab0231

Please sign in to comment.