-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prettier): update dependency @trivago/prettier-plugin-sort-impor…
…ts to v5 (#848) * feat(prettier): update dependency @trivago/prettier-plugin-sort-imports to v5 * Move to an install script for prettier executables * [prettier] Install svelte dependencies This is now needed by prettier-plugin-sort-import@v5. No idea why. * [prettier] go back to simpler CMD * [prettier] flip the name we install vs the copy * [prettier] make shim executable more robust --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: patrick brisbin <[email protected]>
- Loading branch information
1 parent
f253930
commit 61bfc9c
Showing
5 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
plugins=( | ||
tailwindcss | ||
@trivago/prettier-plugin-sort-imports | ||
) | ||
|
||
for plugin in "${plugins[@]}"; do | ||
(cd /app/node_modules/"$plugin" && yarn link) | ||
done | ||
|
||
cat >/usr/local/bin/prettier <<EOM | ||
#!/usr/bin/env bash | ||
if ! yarn --offline link ${plugins[*]} >/dev/null; then | ||
echo "Failed to link yarn modules" >&2 | ||
echo "Please report this as an issue" >&2 | ||
echo "https://github.com/restyled-io/restylers/issues" >&2 | ||
exit 1 | ||
fi | ||
trap 'yarn --offline unlink ${plugins[*]} >/dev/null || true' EXIT | ||
/app/node_modules/.bin/prettier "\$@" | ||
EOM | ||
|
||
chmod +x /usr/local/bin/prettier | ||
|
||
# Copy as a legacy name we may see as CMD in the wild | ||
cp /usr/local/bin/prettier{,-with-tailwindcss} |
This file contains 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 characters
This file was deleted.
Oops, something went wrong.