specify dependencies in composer.json instead of loading in index.php

This commit is contained in:
Aaron Parecki 2014-05-26 08:04:29 -07:00
parent 9ff3e59193
commit 9ff63c19ec
3 changed files with 9 additions and 5 deletions

View file

@ -9,5 +9,13 @@
"indieauth/client": "0.1.3", "indieauth/client": "0.1.3",
"mpratt/relativetime": ">=1.0", "mpratt/relativetime": ">=1.0",
"firebase/php-jwt": "dev-master" "firebase/php-jwt": "dev-master"
},
"autoload": {
"files": [
"lib/Savant.php",
"lib/config.php",
"lib/helpers.php",
"lib/markdown.php"
]
} }
} }

2
composer.lock generated
View file

@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
], ],
"hash": "676692118149f622d7ca2349f775eb8c", "hash": "3e034e0a6a692d5bbfecfdc95ee69db2",
"packages": [ "packages": [
{ {
"name": "firebase/php-jwt", "name": "firebase/php-jwt",

View file

@ -1,10 +1,6 @@
<?php <?php
chdir('..'); chdir('..');
require 'vendor/autoload.php'; require 'vendor/autoload.php';
require 'lib/Savant.php';
require 'lib/config.php';
require 'lib/helpers.php';
require 'lib/markdown.php';
// Configure the Savant plugin // Configure the Savant plugin
\Slim\Extras\Views\Savant::$savantDirectory = 'vendor/saltybeagle/savant3'; \Slim\Extras\Views\Savant::$savantDirectory = 'vendor/saltybeagle/savant3';