Ticket #148 (assigned defect)
About MakeVendor
| Reported by: | Khaoz | Owned by: | pmjones |
|---|---|---|---|
| Priority: | minor | Component: | code |
| Keywords: | Cc: |
Description
I was talking with Paul Jones about some possible problems with MakeVendor?. MakeVendor? seems to expect some configuration file or at last a "system" parameter (Solar_Cli_MakeVendor, line 116). So:
1) make-vendor really need a configuration file or it's possible to pass a getcwd to the $system ? 2) make-vendor seems to create two vendor dirs, Example:
source/vendor/Vendor/App
instead of:
source/Vendor/App.....
Is that right ?
After read solar source code a bit, i have a few suggestions on the cli tools:
Create a Solar_Cli_InitProject. Usage:
solar init-project myproject
myproject/
source/
include/
public/
config/
solar <- binary
from now, every command is executed inside myproject:
./solar make-vendor Vendor1 // based on getcwd
myproject/
source/
Vendor1/App/Public/images/
scripts/
styles/
include/
Vendor1 -> ../source/Vendor1/
public/Vendor1 -> ../Vendor1/App/Public
config/Vendor1.config.php
vendor1.docroot/
solar
./solar make-app Vendor1 MyApp
source/
Vendor1/App/Public/images/
scripts/
styles/
MyApp.php
MyApp/Helper
/Layout
/Locale
/View/index.php
include/
public/Vendor1 -> ../Vendor1/App/Public
config/Vendor1.config.php
vendor1.docroot/
solar
./solar make-model Vendor1 MyModel // adapter (yes or no ? ) plus some parameters if you want to get definitions from a existing table ?
source/
Vendor1/App/Public/images/
scripts/
styles/
MyApp.php
MyApp/Helper
/Layout
/Locale
/View/index.php
Vendor1/Model/MyModel.php
/MyModel/Collection.php
/Record.php
/Setup/table_cols.php
/table_name.php
include/
public/Vendor1 -> ../Vendor1/App/Public
config/Vendor1.config.php
vendor1.docroot/
solar
With this, solar command line become more simple (--target, --config, --include will be used only for customized structures). Solar_Cli_InitProject seems to be simple and i can code it if you want.
