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

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

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

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