Skip to content

Commit

Permalink
rollup config + fail on error
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari committed Dec 7, 2023
1 parent 5028e08 commit d172746
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -e

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
output_file="$SCRIPT_DIR/../ApolloCodegenFrontendBundle.swift"
$( cd "$SCRIPT_DIR" && rollup -c )
$( cd "$SCRIPT_DIR" && rollup -c --bundleConfigAsCjs )
minJS=$(cat "$SCRIPT_DIR/dist/ApolloCodegenFrontend.bundle.js")
printf "%s%s%s" "let ApolloCodegenFrontendBundle: String = #\"" "$minJS" "\"#" > $output_file
exit 0

0 comments on commit d172746

Please sign in to comment.