Instructions and build script tunings

This commit is contained in:
PMKuipers 2023-09-01 12:42:21 +02:00
parent 6f71cfd4b3
commit 37596d3eee
2 changed files with 13 additions and 4 deletions

View File

@ -8,4 +8,6 @@ Instructions for downloading and integrating vue
4. add the following to top of both files
/* eslint-disable */
/* eslint no-unused-vars: "off" */
/* eslint no-unused-vars: "off" */
5. run "./vuemode.sh dev -f" or "./vuemode.sh prod -f" to force copying the correct vuejs file to the active file

View File

@ -1,14 +1,21 @@
#!/bin/bash
SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
WD=`pwd`
# get the current vuejs mode
VUEMODE=`$SCRIPTDIR/vuemode.sh query`
if [[ $? -eq 1 ]]; then
exit 1
fi
# switch vuejs to prod mode
$SCRIPTDIR/vuemode.sh prod
if [[ "$1" == "dev" ]]; then
BUILDMODE='dev';
else
BUILDMODE='prod';
fi
# switch vuejs to build mode
$SCRIPTDIR/vuemode.sh $BUILDMODE
# run the grunt script in the scripts working directory
# so we can be sure all javascript is properly built from the most recent source
@ -19,7 +26,7 @@ grunt scssplugin # plugin specific scss task to compile styles.css from scss fil
# run the build php script
php ${SCRIPTDIR}/build.php $@
if [[ "$VUEMODE" == "dev" ]]; then
if [[ "$VUEMODE" != "$BUILDMODE" ]]; then
# switch vuejs vack to original mode
$SCRIPTDIR/vuemode.sh $VUEMODE