Created
April 20, 2012 08:11
-
-
Save liuggio/2427058 to your computer and use it in GitHub Desktop.
symfony2 store your assets into the github
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
//app/autoload.php | |
$loader->registerNamespaces(array( | |
... | |
// add TQ library to namespace | |
'TQ' => __DIR__.'/../vendor/PHP-Stream-Wrapper-for-Git/src', | |
... | |
)); | |
.... | |
//at the end of the file | |
use TQ\Git\Cli\Binary; | |
use TQ\Git\StreamWrapper\StreamWrapper; | |
StreamWrapper::register('php-git', new Binary('/usr/bin/git')); |
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
# app/config/config.yml | |
framework: | |
# ... | |
templating: | |
# ... | |
assets_base_urls: [https://raw.github.com/liuggio/UsingGitHubAsAssetsCloudFiles/master/] | |
# | |
# YOU COULD ALSO USE PACKAGES INTO TWIG IN ORDER TO SPLIT THE FILES IN REPO | |
# packages: | |
# rscf: | |
# base_urls: [https://raw.github.com/liuggio/UsingGitHubAsAssetsCloudFiles/master/] | |
#... | |
# Assetic Configuration | |
assetic: | |
debug: %kernel.debug% | |
use_controller: false | |
write_to: php-git://UsingGitHubAsAssetsCloudFiles/ # this is the directory /UsingGitHubAsAssetsCloudFiles | |
java: /usr/bin/java | |
filters: | |
cssrewrite: ~ | |
cssembed: | |
jar: %kernel.root_dir%/Resources/java/cssembed-0.3.6.jar | |
closure: | |
jar: %kernel.root_dir%/Resources/java/compiler.jar | |
yui_css: | |
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar | |
yui_js: | |
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar |
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
[PHP-Stream-Wrapper-for-Git] | |
git=git://github.com/teqneers/PHP-Stream-Wrapper-for-Git.git |
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
#!/bin/sh | |
# in you /UsingGitHubAsAssetsCloudFiles/.git/hooks/post-commit | |
git push origin master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment