Skip to content
This repository has been archived by the owner on Mar 28, 2021. It is now read-only.

Commit

Permalink
upgrade versions and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
synox committed Sep 14, 2016
1 parent cc1c006 commit 7ac2c00
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 19 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ composer install
# copy backend
cp -rv src/{backend.php,config.sample.php} dist/

# install javascript dependencies
npm install

# build Javascript frontend
npm run build

Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/backend-libs/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0::getLoader();
return ComposerAutoloaderInit125dddd280a32cf75b181166154246ec::getLoader();
12 changes: 7 additions & 5 deletions dist/backend-libs/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class ClassLoader

private $useIncludePath = false;
private $classMap = array();

private $classMapAuthoritative = false;
private $missingClasses = array();

public function getPrefixes()
{
Expand Down Expand Up @@ -322,20 +322,20 @@ public function findFile($class)
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative) {
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}

$file = $this->findFileWithExtension($class, '.php');

// Search for Hack files if we are running on HHVM
if ($file === null && defined('HHVM_VERSION')) {
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}

if ($file === null) {
if (false === $file) {
// Remember that this class does not exist.
return $this->classMap[$class] = false;
$this->missingClasses[$class] = true;
}

return $file;
Expand Down Expand Up @@ -399,6 +399,8 @@ private function findFileWithExtension($class, $ext)
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}

return false;
}
}

Expand Down
8 changes: 4 additions & 4 deletions dist/backend-libs/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0
class ComposerAutoloaderInit125dddd280a32cf75b181166154246ec
{
private static $loader;

Expand All @@ -19,15 +19,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit125dddd280a32cf75b181166154246ec', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit125dddd280a32cf75b181166154246ec', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInit38e9d02473bfdb3672d6b8a39de2fbc0::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit125dddd280a32cf75b181166154246ec::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
Expand Down
4 changes: 2 additions & 2 deletions dist/backend-libs/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit38e9d02473bfdb3672d6b8a39de2fbc0
class ComposerStaticInit125dddd280a32cf75b181166154246ec
{
public static $prefixesPsr0 = array (
'P' =>
Expand All @@ -19,7 +19,7 @@ class ComposerStaticInit38e9d02473bfdb3672d6b8a39de2fbc0
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixesPsr0 = ComposerStaticInit38e9d02473bfdb3672d6b8a39de2fbc0::$prefixesPsr0;
$loader->prefixesPsr0 = ComposerStaticInit125dddd280a32cf75b181166154246ec::$prefixesPsr0;

}, null, ClassLoader::class);
}
Expand Down
20 changes: 14 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,41 @@ This is **alpha-tested** software, do not use it in production yes, it may lose

## Build it yourself
Instead of using the files in the `dist` directory you can also build it yourself. You must have [npm](https://docs.npmjs.com/cli/install) and [composer](https://getcomposer.org/download/) installed.
The files are written to the `dist` directory. See also `build.sh`.


Install php dependecies:

composer install

Copy backend files:

cp -rv src/{backend.php,config.sample.php} dist/

Install javascript dependencies:

npm install

Build frontend:

gulp build
npm run build

Run frontend with development server:

npm start

The files are written to the `dist` directory. See also `build.sh`.

There is a [Vagrantfile](Vagrantfile), in case you are familiar with [vagrant](https://www.vagrantup.com/).

## TODO
1. reduce total dist size (<1 MB)
1. setup a link redirection provider (to keep the existence of your installation secret)
1. maybe make mails collapsible
1. provide error message if config.php is missing or in a public folder.
2. provide error message if config.php is missing or in a public folder.

## Credit

This could not be possible without...

* http://angularjs.org/
* https://github.com/SchweizerischeBundesbahnen/esta-webjs
* https://github.com/barbushin/php-imap
* https://github.com/gregjacobs/Autolinker.js/
* https://github.com/TomFrost/node-phonetic

0 comments on commit 7ac2c00

Please sign in to comment.