forked from dollarshaveclub/es-check
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from yowainwright/chore-maintenance
chore: modern bumps updates
- Loading branch information
Showing
10 changed files
with
1,018 additions
and
996 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Node.js", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { "VARIANT": "18-bullseye", "NODE_ENV": "docker-dev" } | ||
}, | ||
"settings": {}, | ||
"extensions": [ | ||
"rvest.vs-code-prettier-eslint", | ||
"ZixuanChen.vitest-explorer", | ||
"wix.vscode-import-cost", | ||
"eamodio.gitlens" | ||
], | ||
"postCreateCommand": "pnpm install --ignore-scripts", | ||
"remoteUser": "node" | ||
} |
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,3 @@ | ||
ARG VARIANT="18-bullseye" | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} | ||
RUN su node -c "npm install -g pnpm" |
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,2 @@ | ||
PNPM_VERSION=8.1.1 | ||
NODE_ENV=local |
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 |
---|---|---|
|
@@ -62,3 +62,4 @@ typings/ | |
package-lock.json | ||
.dccache | ||
.husky | ||
.pnpm-store |
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 |
---|---|---|
@@ -1 +1 @@ | ||
16 | ||
18 |
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,47 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -f .env ]; then | ||
cp .env_starter .env | ||
echo "created .env file from .env_starter" | ||
export $(grep -v '^#' .env | xargs) | ||
else | ||
export $(grep -v '^#' .env | xargs) | ||
fi | ||
|
||
# Get .env variables | ||
[ ! -f .env ] || export $(grep -v '^#' .env | xargs) | ||
|
||
# Check to see if Homebrew, Go, and Pre-commit are installed, and install it if it is not | ||
HAS_NVM=$(command -v nvm >/dev/null) | ||
HAS_PNPM=$(command -v pnpm >/dev/null) | ||
|
||
|
||
if $HAS_NVM; then | ||
. ~/.nvm/nvm.sh install | ||
else | ||
echo "Please install NVM or ensure your version matches the .nvmrc file" | ||
exit 1 | ||
fi | ||
|
||
PNPM_MSG="Please install PNPM or ensure your version matches the pnpm version within the .env file" | ||
|
||
# load pnpm | ||
if $HAS_PNPM; then | ||
PNPM_LOADED_VERSION=$(command pnpm --version) | ||
if [ "$PNPM_LOADED_VERSION" != "$PNPM_VERSION" ]; then | ||
read -r -p "pnpm versions are out of snyc. Run 'npm install -g pnpm@${PNPM_VERSION}'? [Y/n]" response | ||
response=$(echo "$response" | tr '[:upper:]' '[:lower:]') | ||
if [ $response = "y" ] || [ -z $response ]; then | ||
npm install -g pnpm@$PNPM_VERSION | ||
echo 'pnpm version updated globally' | ||
else | ||
echo $PNPM_MSG | ||
exit 1 | ||
fi; | ||
else | ||
echo "pnpm version is up-to-date" | ||
fi | ||
else | ||
echo $PNPM_MSG | ||
exit 1 | ||
fi |
Oops, something went wrong.