require_once(ROOT_PDIR . 'core/libs/core/cli/Arguments.php'); require_once(ROOT_PDIR . 'core/libs/core/cli/Argument.php'); $arguments = new \Core\CLI\Arguments([ 'core' => [ 'description' => 'Minify Core resources.', 'value' => false, 'shorthand' => [], ], 'component' => [ 'description' => 'Minify a requested component resources.', 'value' => true, 'shorthand' => ['c'], ], 'theme' => [ 'description' => 'Minify a requested theme resources.', 'value' => true, 'shorthand' => ['t'], ], 'lang' => [ 'description' => 'Language to generate the ini', 'value' => true, 'required' => false, ], 'dry-run' => [ 'description' => 'Only perform a "dry-run" test of the import, do not change any file but instead output the resulting .ini to stdout.', 'value' => false, ], ]); $arguments->usageHeader = 'This script will generate an i18n ini file for the requested component or theme.' . NL . NL . $argv[0] . ' --(core|component=[name]|theme=[name]) --lang=[lang]'; $arguments->processArguments();
$arguments = new \Core\CLI\Arguments([ 'php' => [ 'description' => 'Compile PHP files into the compiled bootstrap.', 'value' => false, 'shorthand' => [], 'assign' => &$compilePHP, ], 'scss' => [ 'description' => 'Compile SASS/SCSS files into corresponding css.', 'value' => false, 'shorthand' => [], 'assign' => &$compileSCSSFull, ], 'sass' => [ 'description' => 'Alias of --scss', 'value' => false, 'shorthand' => [], 'assign' => &$compileSCSSFull, ], 'scss-dev' => [ 'description' => 'Compile SASS/SCSS files (only development versions).', 'value' => false, 'assign' => &$compileSCSSDev, ], 'sass-dev' => [ 'description' => 'Alias of --scss-dev', 'value' => false, 'assign' => &$compileSCSSDev, ], 'js' => [ 'description' => 'Minify javascript assets', 'value' => false, 'shorthand' => [], 'assign' => &$compileJS, ], 'javascript' => [ 'description' => 'Alias of --js', 'value' => false, 'shorthand' => [], 'assign' => &$compileJS, ], 'core' => [ 'description' => 'Minify Core resources.', 'value' => false, 'shorthand' => [], 'assign' => &$onlyCore, ], 'component' => [ 'description' => 'Minify a requested component resources.', 'value' => true, 'shorthand' => ['c'], 'assign' => &$onlyComponent, ], 'theme' => [ 'description' => 'Minify a requested theme resources.', 'value' => true, 'shorthand' => ['t'], 'assign' => &$onlyTheme, ], ]);
$arguments = new \Core\CLI\Arguments([ 'help' => [ 'description' => 'Display help and exit.', 'value' => false, 'shorthand' => ['?', 'h'], ], 'component' => [ 'description' => 'Operate on a component with the given name.', 'value' => true, 'shorthand' => ['c'], ], 'list-components' => [ 'description' => '(DEPRECATED) Alias of --list', 'value' => false, 'shorthand' => [], ], 'list-themes' => [ 'description' => '(DEPRECATED) Alias of --list', 'value' => false, 'shorthand' => [], ], 'list' => [ 'description' => 'List all available components and themes, along with their versions and flags', 'value' => false, 'shorthand' => 'l', ], 'repackage' => [ 'description' => 'Simply repackage a given component or theme. Useful for updating a package while in development.', 'value' => false, 'shorthand' => ['r'], ], 'theme' => [ 'description' => 'Operate on a theme with the given name.', 'value' => true, 'shorthand' => ['t'], ], ]);
if(!isset($_SERVER['SHELL'])){ die("Please run this script from the command line."); } define('ROOT_PDIR', realpath(dirname(__DIR__) . '/src/') . '/'); define('BASE_DIR', realpath(dirname(__DIR__)) . '/'); // Include the core bootstrap, this will get the system functional. require_once(ROOT_PDIR . 'core/bootstrap.php'); $args = new \Core\CLI\Arguments( [ 'help' => [ 'description' => 'Display help and exit.', 'value' => false, 'shorthand' => ['?', 'h'], ], ] ); $args->processArguments(); if($args->getArgumentValue('help')){ $args->printUsage(); exit; } $dir = BASE_DIR . 'exports/bundles'; $bundles = [];
$arguments = new \Core\CLI\Arguments([ 'verbosity' => [ 'description' => "Verbosity level of output.\n\t0: Summary-Only Output\n\t1: (default) Real-Time Output\n\t2: Verbose Real-Time Output", 'value' => true, 'default' => 1, 'assign' => &$verbosity, ], 'assets' => [ 'description' => 'Only process assets', 'value' => false, 'shorthand' => [], 'assign' => &$assets, ], 'core' => [ 'description' => 'Reinstall only Core. (Overrides --component and --theme)', 'value' => false, 'shorthand' => [], 'assign' => &$onlyCore, ], 'component' => [ 'description' => 'Reinstall only a requested component. (Overrides --theme)', 'value' => true, 'shorthand' => ['c'], 'assign' => &$onlyComponent, ], 'theme' => [ 'description' => 'Reinstall only a requested theme.', 'value' => true, 'shorthand' => ['t'], 'assign' => &$onlyTheme, ], ]);