Instructions and build script tunings
This commit is contained in:
parent
6f71cfd4b3
commit
37596d3eee
2 changed files with 13 additions and 4 deletions
|
@ -8,4 +8,6 @@ Instructions for downloading and integrating vue
|
||||||
|
|
||||||
4. add the following to top of both files
|
4. add the following to top of both files
|
||||||
/* eslint-disable */
|
/* 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
|
13
build.sh
13
build.sh
|
@ -1,14 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
WD=`pwd`
|
WD=`pwd`
|
||||||
|
|
||||||
# get the current vuejs mode
|
# get the current vuejs mode
|
||||||
VUEMODE=`$SCRIPTDIR/vuemode.sh query`
|
VUEMODE=`$SCRIPTDIR/vuemode.sh query`
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ $? -eq 1 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# switch vuejs to prod mode
|
if [[ "$1" == "dev" ]]; then
|
||||||
$SCRIPTDIR/vuemode.sh prod
|
BUILDMODE='dev';
|
||||||
|
else
|
||||||
|
BUILDMODE='prod';
|
||||||
|
fi
|
||||||
|
|
||||||
|
# switch vuejs to build mode
|
||||||
|
$SCRIPTDIR/vuemode.sh $BUILDMODE
|
||||||
|
|
||||||
# run the grunt script in the scripts working directory
|
# run the grunt script in the scripts working directory
|
||||||
# so we can be sure all javascript is properly built from the most recent source
|
# 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
|
# run the build php script
|
||||||
php ${SCRIPTDIR}/build.php $@
|
php ${SCRIPTDIR}/build.php $@
|
||||||
|
|
||||||
if [[ "$VUEMODE" == "dev" ]]; then
|
if [[ "$VUEMODE" != "$BUILDMODE" ]]; then
|
||||||
# switch vuejs vack to original mode
|
# switch vuejs vack to original mode
|
||||||
$SCRIPTDIR/vuemode.sh $VUEMODE
|
$SCRIPTDIR/vuemode.sh $VUEMODE
|
||||||
|
|
||||||
|
|
Reference in a new issue