Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/scripts/extension.sh
Show All 37 Lines | |||||
export INLINE_RUNTIME_CHUNK=false | export INLINE_RUNTIME_CHUNK=false | ||||
export GENERATE_SOURCEMAP=false | export GENERATE_SOURCEMAP=false | ||||
npm run build | npm run build | ||||
# Copy extension build files to extension/ folder | # Copy extension build files to extension/ folder | ||||
cp -r build/* extension/dist | cp -r build/* extension/dist | ||||
# Copy other needed extension files | # Browserify contentscript.js and background.js to pull in their imports | ||||
cp extension/src/contentscript.js extension/dist | browserify extension/src/contentscript.js -o extension/dist/contentscript.js | ||||
cp extension/src/background.js extension/dist | browserify extension/src/background.js -o extension/dist/background.js | ||||
# Delete extension build from build/ folder (reserved for web app builds) | # Delete extension build from build/ folder (reserved for web app builds) | ||||
rm -Rf build | rm -Rf build | ||||
# Replace original web files | # Replace original web files | ||||
rm src/assets/popout.svg | rm src/assets/popout.svg | ||||
rm public/manifest.json | rm public/manifest.json | ||||
rm src/components/App.js | rm src/components/App.js | ||||
rm src/components/App.css | rm src/components/App.css | ||||
# Note, src/assets/popout.svg does not need to be replaced, not used by web app | # Note, src/assets/popout.svg does not need to be replaced, not used by web app | ||||
mv ${WORKDIR}/manifest.json public/ | mv ${WORKDIR}/manifest.json public/ | ||||
mv ${WORKDIR}/App.js src/components/ | mv ${WORKDIR}/App.js src/components/ | ||||
mv ${WORKDIR}/App.css src/components/ | mv ${WORKDIR}/App.css src/components/ | ||||
echo 'Extension built and web files replaced!' | echo 'Extension built and web files replaced!' | ||||
No newline at end of file | No newline at end of file |