Add yarn command to the diaspora-dev docker script
This commit is contained in:
parent
95a9c329af
commit
fdcea3e824
1 changed files with 18 additions and 4 deletions
|
|
@ -78,8 +78,11 @@ print_usage() {
|
|||
;;
|
||||
bundle)
|
||||
echo; echo "Install gems using bundle into $DIASPORA_ROOT"
|
||||
print_usage_header "bundle [options]" \
|
||||
"-d Run in background"
|
||||
print_usage_header "bundle"
|
||||
;;
|
||||
yarn)
|
||||
echo; echo "Install frontend dependencies using yarn into $DIASPORA_ROOT"
|
||||
print_usage_header "yarn"
|
||||
;;
|
||||
config)
|
||||
echo; echo "Create basic configuration files for usage with PostgreSQL (default)"
|
||||
|
|
@ -151,6 +154,7 @@ print_usage_full() {
|
|||
echo "Misc. Commands:"
|
||||
echo " build Build basic diaspora* environment"
|
||||
echo " bundle (Re-)Install gems for diaspora*"
|
||||
echo " yarn (Re-)Install frontend dependencies for diaspora*"
|
||||
echo " config Configure diaspora*"
|
||||
echo " exec Execute a command in the run environment (advanced)"
|
||||
echo " help Show help for commands"
|
||||
|
|
@ -223,12 +227,19 @@ dia_bundle() {
|
|||
echo "Installing gems via bundler ..."
|
||||
dia_docker_compose run \
|
||||
--rm \
|
||||
--no-deps $1 \
|
||||
--no-deps \
|
||||
-e DIA_NODB=1 \
|
||||
diaspora \
|
||||
/bin/sh -c "gem install bundler && script/configure_bundler && bin/bundle install --full-index"
|
||||
}
|
||||
|
||||
dia_yarn() {
|
||||
# Run yarn in order to install all frontend dependencies into $DIASPORA_ROOT
|
||||
# Do not start database, not required and sometimes not yet configured
|
||||
echo "Installing frontend dependencies via yarn ..."
|
||||
dia_docker_compose run --rm --no-deps -e DIA_NODB=1 diaspora bin/yarn
|
||||
}
|
||||
|
||||
dia_clean() {
|
||||
# Delete all containers and volumes
|
||||
for i in "$@"; do
|
||||
|
|
@ -524,7 +535,7 @@ case "$dia_command" in
|
|||
dia_build "$@"
|
||||
;;
|
||||
bundle)
|
||||
dia_bundle "$1"
|
||||
dia_bundle
|
||||
;;
|
||||
clean)
|
||||
dia_clean "$@"
|
||||
|
|
@ -574,6 +585,9 @@ case "$dia_command" in
|
|||
stop)
|
||||
dia_stop
|
||||
;;
|
||||
yarn)
|
||||
dia_yarn
|
||||
;;
|
||||
*)
|
||||
print_usage
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue