This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made
zep
binary again, added more structure to it.
- Loading branch information
1 parent
00bcf96
commit b8ee48e
Showing
2 changed files
with
33 additions
and
22 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,33 @@ | ||
#!/usr/bin/php | ||
<?php | ||
|
||
// Require stuff | ||
require(__DIR__ . '/../vendor/autoload.php'); | ||
|
||
$zep = new Zepto\Console($argv); | ||
|
||
// Add parameter | ||
$zep->param('option', 'Choose from init or new', true); | ||
|
||
// Add options | ||
$zep->option('-p, --plugin', 'Create new plugin'); | ||
$zep->option('-c, --content', 'Create new content'); | ||
|
||
if(!$zep->parse()) { | ||
exit(1); | ||
} | ||
|
||
$input = $zep->getInputs(); | ||
|
||
if ($zep->get('option') === 'init') { | ||
$zep->out('init'); | ||
// do init shit | ||
} | ||
elseif ($zep->get('option') === 'new') { | ||
if (in_array(array('-p', '--plugin'), $input) && $input['-p'] === true) { | ||
$zep->out('new plugin'); | ||
} | ||
elseif (in_array(array('-c', '--content'), $input) && $input['-c'] === true) { | ||
$zep->out('new content'); | ||
} | ||
} |