m-derakhshi/laravel-stub-generator

There is no license information available for the latest version (1.0.6) of this package.

stubGeneratorDev

1.0.6 2024-11-03 22:09 UTC

This package is auto-updated.

Last update: 2024-11-03 22:10:37 UTC


README

Example config

file path : /config/stubGenerator.php

return [
  'directories'     => [
    'Module'  => [
      'targets' => [
        ['namespace' => 'Modules', 'path' => base_path('modules').'/'],
        ['namespace' => 'Packages', 'path' => base_path('packages').'/'],
        ['namespace' => 'Projects', 'path' => base_path('projects').'/'],
      ],
    ],
    'Project' => [
      'targets' => [['namespace' => 'Projects', 'path' => base_path('projects').'/'],],
    ],
    'Package' => [
      'targets' => [['namespace' => 'Packages', 'path' => base_path('packages').'/'],],
    ],
  ],
  'fileTypeRewrite' => [
    '.php',
    '.stub',
    '.json',
  ],
  'fileTypeRemove'  => [
    '.stub',
  ],
];

stub directories in base_path/stubs like:

base_path/stubs
    modules
        directory/
        file.stub
        file.php.stub
    projects
        directory/
        file.stub
        file.php.stub
    packages
        directory/
        file.stub
        file.php.stub