summaryrefslogtreecommitdiffstats
path: root/admin/survey/minify/bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/minify/bootstrap.php')
-rw-r--r--admin/survey/minify/bootstrap.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/admin/survey/minify/bootstrap.php b/admin/survey/minify/bootstrap.php
new file mode 100644
index 0000000..4812aea
--- /dev/null
+++ b/admin/survey/minify/bootstrap.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Sets up autoloading and returns the Minify\App
+ */
+
+call_user_func(function () {
+
+ /*if (is_dir(__DIR__ . '/../../../vendor')) {
+ // Used as a composer library
+ $vendorDir = __DIR__ . '/../../../vendor';
+ } else {
+ $vendorDir = __DIR__ . '/vendor';
+ }*/
+ // Ker imamo drug vendor v rootu
+ $vendorDir = __DIR__ . '/vendor';
+
+ $file = $vendorDir . '/autoload.php';
+ if (!is_file($file)) {
+ echo 'You must set up the project dependencies, run the following commands:'.PHP_EOL.
+ 'curl -sS https://getcomposer.org/installer | php'.PHP_EOL.
+ 'php composer.phar install'.PHP_EOL;
+ exit(1);
+ }
+
+ require $file;
+});
+
+return new \Minify\App(__DIR__);