1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 00:20:08 +01:00

organize better

This commit is contained in:
Taylor Otwell
2016-05-10 08:29:24 -05:00
parent d4164ad764
commit 97f7ae2342
37 changed files with 13 additions and 13 deletions

View File

@@ -4,8 +4,8 @@
/** /**
* Load correct autoloader depending on install location. * Load correct autoloader depending on install location.
*/ */
if (file_exists(__DIR__.'/vendor/autoload.php')) { if (file_exists(__DIR__.'/../vendor/autoload.php')) {
require __DIR__.'/vendor/autoload.php'; require __DIR__.'/../vendor/autoload.php';
} else { } else {
require __DIR__.'/../../autoload.php'; require __DIR__.'/../../autoload.php';
} }

View File

@@ -15,12 +15,12 @@
], ],
"autoload": { "autoload": {
"files": [ "files": [
"includes/compatibility.php", "cli/includes/compatibility.php",
"includes/facades.php", "cli/includes/facades.php",
"includes/helpers.php" "cli/includes/helpers.php"
], ],
"psr-4": { "psr-4": {
"Valet\\": "src/" "Valet\\": "cli/Valet/"
} }
}, },
"require": { "require": {

View File

@@ -12,7 +12,7 @@
function show_valet_404() function show_valet_404()
{ {
http_response_code(404); http_response_code(404);
require __DIR__.'/404.html'; require __DIR__.'/cli/templates/404.html';
exit; exit;
} }
@@ -61,7 +61,7 @@ function show_valet_404()
*/ */
$valetDriver = null; $valetDriver = null;
require __DIR__.'/drivers/require.php'; require __DIR__.'/cli/drivers/require.php';
$valetDriver = ValetDriver::assign($valetSitePath, $siteName, $uri); $valetDriver = ValetDriver::assign($valetSitePath, $siteName, $uri);

10
valet
View File

@@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! -f "$DIR/valet.php" ] if [ ! -f "$DIR/cli/valet.php" ]
then then
OLDPWD="$PWD" OLDPWD="$PWD"
cd "$DIR/../laravel/valet" cd "$DIR/../laravel/valet"
@@ -12,11 +12,11 @@ fi
if [[ "$1" = "install" ]] || [[ "$1" = "domain" ]] || [[ "$1" = "start" ]] || [[ "$1" = "restart" ]] || [[ "$1" = "stop" ]] || [[ "$1" = "uninstall" ]] if [[ "$1" = "install" ]] || [[ "$1" = "domain" ]] || [[ "$1" = "start" ]] || [[ "$1" = "restart" ]] || [[ "$1" = "stop" ]] || [[ "$1" = "uninstall" ]]
then then
sudo php "$DIR/valet.php" "$@" sudo php "$DIR/cli/valet.php" "$@"
elif [[ "$1" = "share" ]] elif [[ "$1" = "share" ]]
then then
HOST="${PWD##*/}" HOST="${PWD##*/}"
DOMAIN=$(php "$DIR/valet.php" current-domain) DOMAIN=$(php "$DIR/cli/valet.php" current-domain)
for linkname in ~/.valet/Sites/*; do for linkname in ~/.valet/Sites/*; do
@@ -29,9 +29,9 @@ then
done done
# Fetch Ngrok URL In Background... # Fetch Ngrok URL In Background...
bash "$DIR/fetch-share-url.sh" & bash "$DIR/cli/fetch-share-url.sh" &
"$DIR/bin/ngrok" http -host-header=rewrite "$HOST.$DOMAIN:80" "$DIR/bin/ngrok" http -host-header=rewrite "$HOST.$DOMAIN:80"
else else
php "$DIR/valet.php" $@ php "$DIR/cli/valet.php" $@
fi fi