mirror of
https://github.com/moparisthebest/wallabag
synced 2024-12-18 05:32:23 -05:00
Add console script / component
This commit is contained in:
parent
b8f7398632
commit
ff58233f85
@ -3,7 +3,8 @@
|
||||
"silex/silex": "~1.1",
|
||||
"atoum/atoum" : "dev-master",
|
||||
"twig/twig": ">=1.8,<2.0-dev",
|
||||
"symfony/twig-bridge": "~2.3"
|
||||
"symfony/twig-bridge": "~2.3",
|
||||
"knplabs/console-service-provider": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Poche": "src/" }
|
||||
|
10
console
Executable file
10
console
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
set_time_limit(0);
|
||||
|
||||
require_once __DIR__.'/vendor/autoload.php';
|
||||
require_once __DIR__.'/src/app.php';
|
||||
|
||||
$console = $app['console'];
|
||||
|
||||
echo "Hi there";
|
@ -1,5 +1,14 @@
|
||||
<?php
|
||||
use Knp\Provider\ConsoleServiceProvider;
|
||||
|
||||
$app = new Silex\Application();
|
||||
|
||||
$app->register(new Silex\Provider\TwigServiceProvider(), array(
|
||||
'twig.path' => __DIR__.'/views',
|
||||
));
|
||||
|
||||
$app->register(new ConsoleServiceProvider(), [
|
||||
'console.name' => '%normalized_name%',
|
||||
'console.version' => '0',
|
||||
'console.project_directory' => __DIR__.'/..',
|
||||
]);
|
||||
|
@ -6,9 +6,6 @@ if (php_sapi_name() === 'cli-server' && is_file($filename)) {
|
||||
}
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
$app = new Silex\Application();
|
||||
|
||||
require_once __DIR__.'/../src/app.php';
|
||||
require_once __DIR__.'/../src/controllers.php';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user