1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
# Additional Makefile to handle substitutions we need to make in the various
# *.html files in the folder
#
# /usr/lib/python3/dist-packages/strawberry/static/
#
# at build time.
export PYBUILD_BEFORE_INSTALL= sed -i \
-e 's,https:\/\/unpkg.com\/react@[0-9,.]*\/umd,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/graphiql.html,g' \
-e 's,https:\/\/unpkg.com\/react-dom@[0-9,.]*\/umd,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/graphiql.html,g' \
-e 's,https:\/\/unpkg.com\/js-cookie@[0-9,.]*\/dist,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/graphiql.html,g' \
-e 's,https:\/\/unpkg.com\/graphiql@[0-9,.]*,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/graphiql.html,g' \
-e 's,https:\/\/unpkg.com\/@graphiql\/plugin-explorer@[0-9,.]*\/dist,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/graphiql.html,g' \
{build_dir}/strawberry/static/graphiql.html && \
sed -i 's,https:\/\/esm.sh\/@pathfinder-ide\/react@[0-9,.]*\/dist,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/pathfinder.html,g' \
{build_dir}/strawberry/static/pathfinder.html && \
sed -i 's,https:\/\/embeddable-sandbox.cdn.apollographql.com\/_latest,file:\/\/\/usr\/share\/strawberry-graphiql\/static\/apollo-sandbox.html,g' \
{build_dir}/strawberry/static/apollo-sandbox.html
|