Skip to content

Commit 10082f4

Browse files
committed
Add comment to use without Composer
1 parent ad6b0fb commit 10082f4

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ codeigniter/
2020

2121
## Installation
2222

23-
Install this project with Composer:
23+
### With Composer
2424

2525
~~~
2626
$ cd /path/to/codeigniter/
@@ -36,6 +36,34 @@ $ php vendor/kenjis/codeigniter-ss-twig/install.php
3636
* Above command always overwrites exisiting files.
3737
* You must run it at CodeIgniter project root folder.
3838

39+
### Without Composer
40+
41+
Download the latest Twig v1.x: https://github.com/twigphp/Twig/releases
42+
43+
Unzip and install to `application/third_party` folder.
44+
45+
Download the latest codeigniter-ss-twig.
46+
47+
Unzip and copy `codeigniter-ss-twig/libraries/Twig.php` to `application/libraries` folder.
48+
49+
Remove comment marks below and fix the path for `Autoloader.php`:
50+
51+
~~~
52+
--- a/libraries/Twig.php
53+
+++ b/libraries/Twig.php
54+
@@ -9,10 +9,8 @@
55+
*/
56+
57+
// If you don't use Composer, uncomment below
58+
-/*
59+
require_once APPPATH . 'third_party/Twig-1.xx.x/lib/Twig/Autoloader.php';
60+
Twig_Autoloader::register();
61+
-*/
62+
63+
class Twig
64+
{
65+
~~~
66+
3967
## Usage
4068

4169
Load Twig library:

libraries/Twig.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
* @link https://github.com/kenjis/codeigniter-ss-twig
99
*/
1010

11+
// If you don't use Composer, uncomment below
12+
/*
13+
require_once APPPATH . 'third_party/Twig-1.xx.x/lib/Twig/Autoloader.php';
14+
Twig_Autoloader::register();
15+
*/
16+
1117
class Twig
1218
{
1319
private $config = [

0 commit comments

Comments
 (0)