#!/usr/bin/env bash
# Automatic environment switching with direnv
# https://direnv.net/

# Add the current composer bin directory to $PATH
export PATH=$PATH:$(pwd)/vendor/bin
export PATH=$PATH:$(pwd)/node_modules/.bin
export PATH=$PATH:$(pwd)/tests/node_modules/.bin

# Copy .env.example to .env if necessary
if [ ! -f .env.local ]; then
  cp ./.env.local.example ./.env.local
fi

# Load everything defined in .env.local
set -o allexport; source .env.local; set +o allexport
