Fix jQuery import being added with every postinstall script

1930-first-upload-in-a-batch-always-fails
wvffle 2022-11-27 23:57:09 +00:00 zatwierdzone przez JuniorJPDJ
rodzic 8947c030ed
commit 11018736d3
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -36,7 +36,7 @@ tasks:
VUE_EDITOR: code
before: cd front
init: |
[ -d "node_modules" ] || yarn install
yarn install
yarn run i18n-compile
command: yarn dev --host 0.0.0.0 --base /front/

Wyświetl plik

@ -16,5 +16,9 @@ echo "Replacing hardcoded values by CSS vars…"
scripts/fix-fomantic-css.py "$FOMANTIC_SRC_PATH" "$FOMANTIC_SRC_PATH/tweaked"
echo 'Fixing jQuery import…'
# shellcheck disable=SC2046
sed -i '1s/^import jQuery from "jquery"//' $(find "$FOMANTIC_SRC_PATH" -name '*.js')
# shellcheck disable=SC2046
sed -i '1s/^/import jQuery from "jquery"\n/' $(find "$FOMANTIC_SRC_PATH" -name '*.js')