mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-13 10:16:57 +00:00
added script in frontend to use local version of bpmn-js-spiffworkflow w/ burnettk
This commit is contained in:
parent
be8923eaf5
commit
a4a222247e
25
spiffworkflow-frontend/bin/use_local_bpmn_js_spiffworkflow
Executable file
25
spiffworkflow-frontend/bin/use_local_bpmn_js_spiffworkflow
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function error_handler() {
|
||||||
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||||
|
exit "$2"
|
||||||
|
}
|
||||||
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
|
frontend_dir="${script_dir}/.."
|
||||||
|
bpmn_js_dir="${frontend_dir}/../../bpmn-js-spiffworkflow"
|
||||||
|
|
||||||
|
if [[ ! -d "$bpmn_js_dir" ]]; then
|
||||||
|
>&2 echo "ERROR: Could not find a bpmn-js-spiffworkflow dir at '$bpmn_js_dir'. Please clone it from https://github.com/sartography/bpmn-js-spiffworkflow.git."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf "${frontend_dir}/node_modules"
|
||||||
|
|
||||||
|
pushd "$frontend_dir"
|
||||||
|
npm i
|
||||||
|
rm -rf "${bpmn_js_dir}/node_modules"
|
||||||
|
npm link "$bpmn_js_dir"
|
||||||
|
popd
|
Loading…
x
Reference in New Issue
Block a user