Last active
September 5, 2022 21:54
Revisions
-
TooTallNate renamed this gist
Jan 28, 2022 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,10 +14,10 @@ cp "$input" "$files_dir" cd "$files_dir" # Create the `vercel.json` file jq -n --arg file "$input" '{ version: 2, rewrites: [ { "source": "/", "destination": @uri "/\($file)" } ], builds: [ { src: "**/*", use: "@vercel/static" } ] }' > vercel.json # Create deployment, copying the root `url` to clipboard instead of the aliased URL url="$(vercel --prod --no-clipboard)" printf "%s" "$url" | pbcopy echo "Unique URL: $url" -
TooTallNate revised this gist
Apr 16, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,4 +18,6 @@ cd "$files_dir" jq -n --arg file "$input" '{ version: 2, rewrites: [ { "source": "/", "destination": @uri "/\($file)" } ], builds: [ { src: "**/*", use: "@now/static" } ] }' > now.json # Create deployment, copying the root `url` to clipboard instead of the aliased URL url="$(now --prod --no-clipboard)" printf "%s" "$url" | pbcopy echo "Unique URL: $url" -
TooTallNate created this gist
Apr 16, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/bin/bash set -euo pipefail input="$1" shift files_dir="$HOME/files" mkdir -p "$files_dir" # Delete old files rm -f "$files_dir"/* # Copy in the source file cp "$input" "$files_dir" cd "$files_dir" # Create the `now.json` file jq -n --arg file "$input" '{ version: 2, rewrites: [ { "source": "/", "destination": @uri "/\($file)" } ], builds: [ { src: "**/*", use: "@now/static" } ] }' > now.json # Create deployment, copying the root `url` to clipboard instead of the aliased URL now --prod --no-clipboard | pbcopy