Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: switch to shareable tsconfigs #494

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@ jobs:
with:
show-progress: false

- name: 📦 Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
cache: pnpm

- name: 📥 Download dependencies
run: npm ci
run: pnpm install

- name: 🧶 Lint
run: npm run lint
run: pnpm run lint

- name: 🧪 Check types
run: npm run check
run: pnpm run check

test-unit:
name: Unit tests
Expand All @@ -47,17 +52,22 @@ jobs:
with:
show-progress: false

- name: 📦 Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
cache: pnpm

- name: 📥 Download dependencies
run: npm ci
run: pnpm install

- name: 🧪 Run tests
run: npm test
run: pnpm test

deploy-preview:
name: Firebase preview
Expand All @@ -75,7 +85,7 @@ jobs:
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
preview: yes
build-command: npm run build -- --mode dev
build-command: pnpm run build -- --mode dev
repo-token: ${{ secrets.GITHUB_TOKEN }}
env:
VITE_DISCOVER: ${{ secrets.VITE_DISCOVER }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
build-command: npm run build -- --mode dev
build-command: pnpm run build -- --mode dev
env:
VITE_DISCOVER: ${{ secrets.VITE_DISCOVER }}
VITE_WEB_API: ${{ secrets.VITE_WEB_API }}
Expand All @@ -52,7 +52,7 @@ jobs:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
build-command: npm run build -- --mode production
build-command: pnpm run build -- --mode production
service-now-instance: ${{ secrets.SN_INSTANCE }}
service-now-table: ${{ secrets.SN_TABLE }}
service-now-system-id: ${{ secrets.SN_SYS_ID }}
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
"sgid",
"sitla",
"srid",
"startcase",
"tagname",
"tailwindcss",
"topo",
"tsconfigs",
"ugrc",
"usgs",
"USNG",
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ Duplicate the `.env` file and rename it as `.env.local` to add your local secret
Install the project dependencies

```bash
npm install
steveoh marked this conversation as resolved.
Show resolved Hide resolved
pnpm install
```

### Step 2 - Develop and Test

Run `npm start` to start a web server and view the website
Run `pnpm start` to start a web server and view the website

Open [`src/App.jsx`](src/App.jsx) to view the development version of the app.

Build an awesome app.

Run `npm test` to run the unit tests
Run `pnpm test` to run the unit tests

Run `npm run format` to format the code
Run `pnpm run format` to format the code

Run `npm run lint` to lint the code
Run `pnpm run lint` to lint the code

### Step 3 - Optimize

Execute `npm run build` to create an optimized production build
Execute `pnpm run build` to create an optimized production build

_The files will be placed in `/dist`_

Execute `npm run preview` to view the built website
Execute `pnpm run preview` to view the built website

### Step 4 - Deploy

Expand Down
Loading
Loading