mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 09:01:42 -05:00

This adds support for formatters installed locally in project directories via yarn 2's "zero install" [pnp mode](https://yarnpkg.com/features/pnp). It's quite similar to the support for formatters installed locally in a project's `node_modules` via npm, and leverages the `npx` symbol, so existing formatter definitions should work without modification. This checks for a `.pnp.cjs` file (expected in the project root for yarn pnp projects), then looks for a yarn executable, and checks the version of yarn to make sure it supports pnp. If that works, we just push `"yarn"` onto the front of `command`. I've only tested this with a locally installed `prettier.js`. It's very much a works-for-me draft, I'm putting in a PR to make sure this is a workable approach before going any further with it. --------- Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
36 lines
739 B
Bash
Executable file
36 lines
739 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get update
|
|
apt-get install -y ca-certificates curl gnupg lsb-release software-properties-common
|
|
|
|
mkdir -p /etc/apt/keyrings
|
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
NODE_MAJOR=20
|
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
|
|
|
add-apt-repository -n ppa:longsleep/golang-backports
|
|
|
|
apt-get update
|
|
|
|
packages="
|
|
|
|
bsdmainutils
|
|
emacs-nox
|
|
git
|
|
jq
|
|
make
|
|
nodejs
|
|
sudo
|
|
unzip
|
|
wget
|
|
|
|
"
|
|
|
|
apt-get install -y ${packages}
|
|
|
|
rm /etc/emacs/site-start.d/*
|
|
|
|
rm -rf /var/lib/apt/lists/*
|