Skip to content

Commit

Permalink
Flatten by moving app into root.
Browse files Browse the repository at this point in the history
Implements #42
  • Loading branch information
mariuswilms committed Jan 29, 2017
1 parent 9422195 commit 8653c0f
Show file tree
Hide file tree
Showing 54 changed files with 10 additions and 46 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

# Libraries
libraries/*
app/libraries/*

# Temporary files, i.e. compiled templates.
app/resources/tmp/*
resources/tmp/*
4 changes: 2 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ composer create-project unionofrad/framework project
Inside the the `project` directory start the builtin PHP development webserver.

```
php -S 127.0.0.1:8080 -t app/webroot index.php
php -S 127.0.0.1:8080 -t webroot index.php
```

You should now be able to see the welcome page by visiting [http://127.0.0.1:8080](http://127.0.0.1:8080).
Expand Down
12 changes: 0 additions & 12 deletions app/.htaccess

This file was deleted.

22 changes: 0 additions & 22 deletions app/index.php

This file was deleted.

Empty file removed app/tests/integration/empty
Empty file.
Empty file removed app/tests/mocks/empty
Empty file.
Empty file removed app/views/elements/empty
Empty file.
Empty file removed app/webroot/img/empty
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@

/**
* This is the path to the class libraries used by your application, and must contain a copy of the
* Lithium core. By default, this directory is named `libraries`, and resides in the same
* directory as your application. If you use the same libraries in multiple applications, you can
* set this to a shared path on your server.
* Lithium core. By default, this directory is named `libraries`, and resides inside the same
* directory as your application.
*/
define('LITHIUM_LIBRARY_PATH', dirname(LITHIUM_APP_PATH) . '/libraries');
define('LITHIUM_LIBRARY_PATH', LITHIUM_APP_PATH . '/libraries');

/**
* Locate and load Lithium core library files. Throws a fatal error if the core can't be found.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
* the following command:
*
* ```
* php -S 127.0.0.1:8080 -t app/webroot index.php
* php -S 127.0.0.1:8080 -t webroot index.php
* ```
*
* @link http://php.net/manual/en/features.commandline.webserver.php
*/
if (PHP_SAPI === 'cli-server') {
$_SERVER['PHP_SELF'] = '/index.php';

if ($_SERVER['REQUEST_URI'] != '/' && file_exists('./app/webroot' . $_SERVER['REQUEST_URI'])) {
if ($_SERVER['REQUEST_URI'] != '/' && file_exists('./webroot' . $_SERVER['REQUEST_URI'])) {
return false;
}
}

/**
* Include and forward to the actual front-controller.
*/
require 'app/webroot/index.php';
require 'webroot/index.php';

?>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8653c0f

Please sign in to comment.