Skip to content

Commit

Permalink
Add scripts to rule them all
Browse files Browse the repository at this point in the history
  • Loading branch information
rich committed Sep 4, 2024
1 parent a265a32 commit 329d86e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GITHUB_PERSONAL_ACCESS_TOKEN=
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.0.8
15 changes: 15 additions & 0 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# script/bootstrap: Resolve all dependencies that the application requires to
# run.

set -e

cd "$(dirname "$0")/.."

echo "==> Installing node version..."
nvm install


echo "==> Installing node modules..."
npm install
11 changes: 11 additions & 0 deletions scripts/server
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# script/server: Launch the application

set -e

cd "$(dirname "$0")/.."

echo "==> Starting the server..."

npm run start:watch
21 changes: 21 additions & 0 deletions scripts/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# script/setup: Set up the application for the first time after cloning, or set
# it back to the initial unused state.

set -e

cd "$(dirname "$0")/.."

if [ ! -f .env ]; then
cp .env.example .env
fi

if [ ! -f .env.test ]; then
cp .env.example .env
fi

rm -rf node_modules

script/bootstrap

0 comments on commit 329d86e

Please sign in to comment.