Move all custom scripts into the bin directory

Fixes #34
This commit is contained in:
Oliver Davies 2020-05-13 01:59:10 +01:00
parent 6c5fc2be1a
commit f5695468d6
5 changed files with 0 additions and 0 deletions

14
bin/common.sh Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
theme_path="web/themes/custom/opdavies"
function run_command {
title=$1
command=$2
echo -e "\e[32m$title\e[0m"
echo -e "\e[33mExecuting: \e[0m$command"
$command
}

7
bin/config-export.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
cd web
symfony php ../vendor/bin/drush config-export -y

15
bin/install.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
. $(dirname "$0")/common.sh
run_command "Install Composer dependencies" "symfony composer install"
pushd $theme_path
run_command "Install theme dependencies" "symfony run npm install"
popd
pushd web
run_command "Install Drupal" "symfony php ../vendor/bin/drush site-install -y --existing-config"
popd

9
bin/theme-build-dev.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
. $(dirname "$0")/common.sh
cd $theme_path
npm run development

9
bin/theme-build-prod.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
. $(dirname "$0")/common.sh
cd $theme_path
npm run prod