-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding some initial content for zcgo
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: zcgo - A command line for Zen Cart | ||
linkTitle: zcgo - A command line for Zen Cart | ||
description: zcgo - A command line for Zen Cart | ||
weight: 100 | ||
layout: docs | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Commands | ||
weight: 2 | ||
--- | ||
|
||
## make:defines | ||
|
||
The make:defines command is used to convert legacy language files into the new php array format. | ||
|
||
The command accepts up to 3 options | ||
|
||
-f --file | ||
-d --dir | ||
-c --config | ||
|
||
|
||
### -f --file | ||
|
||
This option accepts the path to single file. | ||
|
||
e.g `admin/includes/languages/english/index.php` | ||
|
||
and will convert that file to | ||
|
||
`admin/includes/languages/english/lang.index.php` | ||
|
||
` | ||
### -d --dir | ||
|
||
This option accepts the path to a directory. | ||
|
||
It will attempt to convert al files within the directory renaming files with a `lang.` | ||
prefix. | ||
|
||
### -c --config | ||
|
||
This option accepts the path to a file that contains an array definition used to decide | ||
which files to convert. | ||
|
||
The config file is an array return file, so should look like | ||
|
||
<?php | ||
return []; | ||
|
||
|
||
The array can have 2 root elements, `files` and `directories` | ||
|
||
`files` is a list of files to convert, and similarly `directories` is a list of directories to convert. | ||
|
||
e.g. | ||
|
||
<?php | ||
return [ | ||
'files' => ['file1.php', 'file2.php], | ||
'directories' => ['dir1', 'dir2'] | ||
]; | ||
|
||
## make:idehelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Introduction | ||
weight: 1 | ||
--- | ||
|
||
`zcgo` is a command line interface for Zen Cart that allows developer to run certain actions. | ||
|
||
It is somewhat like the `artisan` command for `Laravel` | ||
|
||
Currently those actions are centered around the new array style language files, but it's | ||
hoped in the future to allow for other commands, such as creating/updating databases without running a full installer | ||
etc. | ||
|
||
`zcgo` relies on `composer` to provide namespacing to access certain classes. So in order to use `zcgo` | ||
you need to do a `composer update` | ||
|
||
In fact it's better if you do | ||
`composer dump-autoload` followed by `composer update` | ||
|