diff --git a/.gitignore b/.gitignore index 4befed3..709c7b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -.idea +.idea/ +vendor/ \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..6f2e134 --- /dev/null +++ b/composer.json @@ -0,0 +1,24 @@ +{ + "name": "statonlab/fields_generator", + "homepage": "https://github.com/statonlab/fields_generator", + "license": "GPL-2.0", + "authors": [ + { + "name": "Abdullah Almsaeed", + "email": "aalmsaee@utk.edu" + }, + { + "name": "Bradford Condon", + "email": "bcondon@utk.edu" + } + ], + "require": {}, + "autoload": { + "psr-4": { + "StatonLab\\FieldGenerator\\": "src/" + } + }, + "bin" : [ + "makefield" + ] +} diff --git a/generate.php b/generate.php deleted file mode 100644 index 4a274ce..0000000 --- a/generate.php +++ /dev/null @@ -1,21 +0,0 @@ -prompt(); - -try { - $path = $app->run(); -} catch (Exception $exception) { - $prompt->error($exception->getMessage()); - exit(1); -} - -$prompt->success('Field generated successfully.'); -$prompt->success("The field can be found at {$path['field']}"); diff --git a/makefield b/makefield new file mode 100755 index 0000000..8ffd8da --- /dev/null +++ b/makefield @@ -0,0 +1,23 @@ +#!/usr/bin/env php +prompt(); + +try { + $path = $app->run(); +} catch (Exception $exception) { + $prompt->error($exception->getMessage()); + exit(1); +} + +$prompt->success('Field generated successfully.'); +$prompt->success("The field can be found at {$path['field']}"); diff --git a/src/CLIPrompt.php b/src/CLIPrompt.php index 5bd6e75..2cf4fdf 100644 --- a/src/CLIPrompt.php +++ b/src/CLIPrompt.php @@ -1,6 +1,6 @@