From 255452f38df0a1156830ab6de177e86ed033e83b Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 04:21:44 -0700 Subject: [PATCH 1/7] Use relative symbolic links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00fec3f3..b0a39c11 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ cd staging spago build # Ensure the compiled JavaScript is available to the client -ln -s output ../client/public/js/output +ln -sr output ../client/public/js/output # Then, start the server. # From 7204d7b43a1158d171542d59eb92bf63abfa52df Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 04:22:14 -0700 Subject: [PATCH 2/7] Use long names for CLI flags --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0a39c11..0db075e2 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ cd staging spago build # Ensure the compiled JavaScript is available to the client -ln -sr output ../client/public/js/output +ln --symbolic --relative output ../client/public/js/output # Then, start the server. # From ca694484cc57acf5fce076dd3a0fe0df3e59a2b0 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 04:58:56 -0700 Subject: [PATCH 3/7] Note differences between MacOS and Linux `ln` command --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 0db075e2..cdf96f95 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,13 @@ cd staging spago build # Ensure the compiled JavaScript is available to the client +# The `ln` command works differently between MacOS and Linux. +# Use the command below that corresponds to your operating system: + +# MacOS users +ln --symbolic output ../client/public/js/output + +# Linux users (requires the `--relative` flag) ln --symbolic --relative output ../client/public/js/output # Then, start the server. From e9bebf28241d241c718f385ec0707f366a6a4cfd Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 07:04:36 -0700 Subject: [PATCH 4/7] Use workaround to ensure one ln command works on MacOS _and_ Linux --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cdf96f95..ff301dca 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,13 @@ stack build cd staging spago build -# Ensure the compiled JavaScript is available to the client -# The `ln` command works differently between MacOS and Linux. -# Use the command below that corresponds to your operating system: - -# MacOS users -ln --symbolic output ../client/public/js/output - -# Linux users (requires the `--relative` flag) -ln --symbolic --relative output ../client/public/js/output +# Ensure the compiled JavaScript is available to the client via symbolic link. +# Note: due to the differences in the `ln` command between +# MacOS (BSD ln) and Linux (GNU ln), the below code will work +# on both operating systems: +pushd ../client/public/js +ln --symbolic ../../../staging/output/ . +popd # Then, start the server. # From 2e9cfdbbad4bda6842fd66885b711645bbf689e9 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 09:57:13 -0700 Subject: [PATCH 5/7] Use PWD workaround rather than previous inverted approach --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ff301dca..6e7857ba 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,7 @@ spago build # Note: due to the differences in the `ln` command between # MacOS (BSD ln) and Linux (GNU ln), the below code will work # on both operating systems: -pushd ../client/public/js -ln --symbolic ../../../staging/output/ . -popd +ln -s "$PWD/output" "$PWD/../client/public/js/output" # Then, start the server. # From 98d4c06ef92e9e930553b1ee99676442066cf254 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 10:00:00 -0700 Subject: [PATCH 6/7] Prevent the symbolic link from being committed accidentally --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 289498d4..eb1860a6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ cabal.sandbox.config *.chs.h *.lksh* bundle/ +client/public/js/output From c8340d86c59e3f4f4f77bbac1a288a507e6c1411 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sat, 29 May 2021 11:13:24 -0700 Subject: [PATCH 7/7] Remove unneeded explanation --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 6e7857ba..9e1daa6c 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,6 @@ cd staging spago build # Ensure the compiled JavaScript is available to the client via symbolic link. -# Note: due to the differences in the `ln` command between -# MacOS (BSD ln) and Linux (GNU ln), the below code will work -# on both operating systems: ln -s "$PWD/output" "$PWD/../client/public/js/output" # Then, start the server.