diff --git a/build.sh b/build.sh index 83f483f..1718623 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/composer.lock b/composer.lock index 591a68a..e7d1308 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "d4d6c6077bbcd7958a06026e4117a70b", + "hash": "18ba77805fd530e1972050e6de7cd151", "content-hash": "357059f60b3f57be6e5f15b1df393a72", "packages": [ { diff --git a/dist/backend-libs/autoload.php b/dist/backend-libs/autoload.php index 3863900..1f97304 100644 --- a/dist/backend-libs/autoload.php +++ b/dist/backend-libs/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0::getLoader(); +return ComposerAutoloaderInit125dddd280a32cf75b181166154246ec::getLoader(); diff --git a/dist/backend-libs/composer/ClassLoader.php b/dist/backend-libs/composer/ClassLoader.php index ff6ecfb..ac67d30 100644 --- a/dist/backend-libs/composer/ClassLoader.php +++ b/dist/backend-libs/composer/ClassLoader.php @@ -53,8 +53,8 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); - private $classMapAuthoritative = false; + private $missingClasses = array(); public function getPrefixes() { @@ -322,20 +322,20 @@ class ClassLoader 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; @@ -399,6 +399,8 @@ class ClassLoader if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } + + return false; } } diff --git a/dist/backend-libs/composer/autoload_real.php b/dist/backend-libs/composer/autoload_real.php index 852a29b..d7598fc 100644 --- a/dist/backend-libs/composer/autoload_real.php +++ b/dist/backend-libs/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0 +class ComposerAutoloaderInit125dddd280a32cf75b181166154246ec { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit38e9d02473bfdb3672d6b8a39de2fbc0 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) { diff --git a/dist/backend-libs/composer/autoload_static.php b/dist/backend-libs/composer/autoload_static.php index 9d05b71..efb5ede 100644 --- a/dist/backend-libs/composer/autoload_static.php +++ b/dist/backend-libs/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit38e9d02473bfdb3672d6b8a39de2fbc0 +class ComposerStaticInit125dddd280a32cf75b181166154246ec { public static $prefixesPsr0 = array ( 'P' => @@ -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); } diff --git a/readme.md b/readme.md index f045ed7..6b7a474 100644 --- a/readme.md +++ b/readme.md @@ -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 \ No newline at end of file