Commit 4c092a8f authored by Micheal Mand's avatar Micheal Mand

Fix module scaffolding

parent 87a2703f
...@@ -214,7 +214,6 @@ class ModuleScaffold ...@@ -214,7 +214,6 @@ class ModuleScaffold
$this->renameVendorName(); $this->renameVendorName();
$this->removeViewResources(); $this->removeViewResources();
$this->finder->delete($this->getModulesPath('Http/routes.php'));
$this->finder->delete($this->getModulesPath("Http/Controllers/{$this->name}Controller.php")); $this->finder->delete($this->getModulesPath("Http/Controllers/{$this->name}Controller.php"));
} }
......
...@@ -26,19 +26,22 @@ return [ ...@@ -26,19 +26,22 @@ return [
'enabled' => false, 'enabled' => false,
'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs', 'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs',
'files' => [ 'files' => [
'start' => 'start.php',
'routes' => 'Http/routes.php',
'views/index' => 'Resources/views/index.blade.php', 'views/index' => 'Resources/views/index.blade.php',
'views/master' => 'Resources/views/layouts/master.blade.php', 'views/master' => 'Resources/views/layouts/master.blade.php',
'scaffold/config' => 'Config/config.php', 'scaffold/config' => 'Config/config.php',
'composer' => 'composer.json', 'composer' => 'composer.json',
'assets/js/app' => 'Resources/assets/js/app.js',
'assets/sass/app' => 'Resources/assets/sass/app.scss',
'webpack' => 'webpack.mix.js',
'package' => 'package.json',
], ],
'replacements' => [ 'replacements' => [
'start' => ['LOWER_NAME', 'ROUTES_LOCATION'], 'routes/web' => ['LOWER_NAME', 'STUDLY_NAME'],
'routes' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'], 'routes/api' => ['LOWER_NAME'],
'webpack' => ['LOWER_NAME'],
'json' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'], 'json' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'views/index' => ['LOWER_NAME'], 'views/index' => ['LOWER_NAME'],
'views/master' => ['STUDLY_NAME'], 'views/master' => ['LOWER_NAME', 'STUDLY_NAME'],
'scaffold/config' => ['STUDLY_NAME'], 'scaffold/config' => ['STUDLY_NAME'],
'composer' => [ 'composer' => [
'LOWER_NAME', 'LOWER_NAME',
...@@ -49,6 +52,7 @@ return [ ...@@ -49,6 +52,7 @@ return [
'MODULE_NAMESPACE', 'MODULE_NAMESPACE',
], ],
], ],
'gitkeep' => true,
], ],
'paths' => [ 'paths' => [
/* /*
...@@ -170,5 +174,13 @@ return [ ...@@ -170,5 +174,13 @@ return [
*/ */
'register' => [ 'register' => [
'translations' => false, 'translations' => false,
/**
* load files on boot or register method
*
* Note: boot not compatible with asgardcms
*
* @example boot|register
*/
'files' => 'register',
], ],
]; ];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment