Skip to content

Commit

Permalink
adding some initial content for zcgo
Browse files Browse the repository at this point in the history
  • Loading branch information
zcwilt committed May 7, 2020
1 parent 6e9707e commit ba8be77
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
7 changes: 7 additions & 0 deletions content/dev/zcgo/_index.md
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
---
58 changes: 58 additions & 0 deletions content/dev/zcgo/commands.md
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
19 changes: 19 additions & 0 deletions content/dev/zcgo/introduction.md
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`

0 comments on commit ba8be77

Please sign in to comment.