Make aquarius plugin do update webpack config

Jonathan Hodgson 7 years ago
parent 52da8caec7
commit 47ca83f09e
  1. 12
      bin/aquarius-plugin

@ -9,6 +9,11 @@ ssh=true
# Cd to public html foder # Cd to public html foder
cd ${PWD%/public_html*}/public_html cd ${PWD%/public_html*}/public_html
function doWebpack(){
line="$1:\t{path: path.resolve(plugins,'aquarius-$1')},"
sed -i "/const aquariusPlugins/a $line" webpack/variables.js
}
# Loop through arguments passed # Loop through arguments passed
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
@ -57,6 +62,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-blocks.git wp-content/plugins/aquarius-blocks git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-blocks.git wp-content/plugins/aquarius-blocks
fi fi
npm install --save wp-content/plugins/aquarius-blocks npm install --save wp-content/plugins/aquarius-blocks
doWebpack blocks
fi fi
shift shift
;; ;;
@ -71,6 +77,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-clients.git wp-content/plugins/aquarius-clients git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-clients.git wp-content/plugins/aquarius-clients
fi fi
npm install --save wp-content/plugins/aquarius-clients npm install --save wp-content/plugins/aquarius-clients
doWebpack clients
fi fi
shift shift
;; ;;
@ -85,6 +92,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-news.git wp-content/plugins/aquarius-news git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-news.git wp-content/plugins/aquarius-news
fi fi
npm install --save wp-content/plugins/aquarius-news npm install --save wp-content/plugins/aquarius-news
doWebpack news
fi fi
shift shift
;; ;;
@ -99,6 +107,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-people.git wp-content/plugins/aquarius-people git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-people.git wp-content/plugins/aquarius-people
fi fi
npm install --save wp-content/plugins/aquarius-people npm install --save wp-content/plugins/aquarius-people
doWebpack people
fi fi
shift shift
;; ;;
@ -127,6 +136,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-projects.git wp-content/plugins/aquarius-projects git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-projects.git wp-content/plugins/aquarius-projects
fi fi
npm install --save wp-content/plugins/aquarius-projects npm install --save wp-content/plugins/aquarius-projects
doWebpack projects
fi fi
shift shift
;; ;;
@ -155,6 +165,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-snippets.git wp-content/plugins/aquarius-snippets git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-snippets.git wp-content/plugins/aquarius-snippets
fi fi
npm install --save wp-content/plugins/aquarius-snippets npm install --save wp-content/plugins/aquarius-snippets
doWebpack snippets
fi fi
shift shift
;; ;;
@ -169,6 +180,7 @@ while test $# -gt 0; do
git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-widgets.git wp-content/plugins/aquarius-widgets git submodule add https://bitbucket.org/fellowshipproductionsltd/aquarius-widgets.git wp-content/plugins/aquarius-widgets
fi fi
npm install --save wp-content/plugins/aquarius-widgets npm install --save wp-content/plugins/aquarius-widgets
doWebpack widgets
fi fi
shift shift
;; ;;

Loading…
Cancel
Save