Skip to content
This repository was archived by the owner on Apr 12, 2020. It is now read-only.
/ browser Public archive

Commit deadbea

Browse files
committed
Added assetic, move twitter bootstrap as dependency
1 parent 186f376 commit deadbea

20 files changed

+947
-9568
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/cache/
22
/config/
33
/vendor/
4+
/web/js/
5+
/web/css/

composer.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
"license": "MIT",
55
"require": {
66
"gitonomy/gitlib" : "dev-master@dev",
7+
"leafo/lessphp" : "dev-master",
8+
"mheap/silex-assetic" : "dev-master@dev",
79
"silex/silex" : "1.0.x@dev",
10+
"silex/web-profiler" : "~1.0@dev",
11+
"symfony/console" : "~2.2",
812
"symfony/form" : "~2.2",
913
"symfony/locale" : "~2.2",
1014
"symfony/translation" : "~2.2",
1115
"symfony/twig-bridge" : "~2.2",
1216
"symfony/validator" : "~2.2",
1317
"twig/twig" : "~1.12",
14-
"silex/web-profiler" : "~1.0@dev"
18+
"twitter/bootstrap" : "2.3.1"
1519
},
1620
"require-dev": {
1721
"symfony/browser-kit" : "~2.2",
@@ -22,5 +26,9 @@
2226
"psr-0": {
2327
"Gitonomy\\Browser": "src"
2428
}
29+
},
30+
"scripts": {
31+
"post-install-cmd": "php console assetic:dump",
32+
"post-update-cmd": "php console assetic:dump"
2533
}
2634
}

composer.lock

+264-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
require __DIR__.'/vendor/autoload.php';
5+
6+
use Symfony\Component\Console\Application as ConsoleApplication;
7+
use Symfony\Component\Console\Input\InputInterface;
8+
use Symfony\Component\Console\Input\InputOption;
9+
use Symfony\Component\Console\Output\OutputInterface;
10+
11+
use Gitonomy\Browser\Application;
12+
13+
$console = new ConsoleApplication('Gitonomy - Browser', '0.1');
14+
15+
$app = new Application(__DIR__.'/config/dev.php');
16+
$app->boot();
17+
18+
$console
19+
->register('assetic:dump')
20+
->setDescription('Dumps all assets to the filesystem')
21+
->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
22+
$dumper = $app['assetic.dumper'];
23+
if (isset($app['twig'])) {
24+
$dumper->addTwigAssets();
25+
}
26+
$dumper->dumpAssets();
27+
$output->writeln('<info>Dump finished</info>');
28+
})
29+
;
30+
31+
$console->run();

0 commit comments

Comments
 (0)