Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
Open
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
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
# Fetch and update latest `yarn` packages
# Fetch and update latest `pnpm` packages for project root
- package-ecosystem: npm
directory: '/'
schedule:
Expand All @@ -13,7 +13,7 @@ updates:
prefix-development: chore
include: scope

# Fetch and update latest `github-actions` packages
# Fetch and update latest `github-actions` packages for project root
- package-ecosystem: github-actions
directory: '/'
schedule:
Expand All @@ -26,7 +26,7 @@ updates:
prefix-development: chore
include: scope

# Fetch and update latest project `yarn` packages
# Fetch and update latest project `pnpm` packages for /src directory
- package-ecosystem: npm
directory: '/src/'
schedule:
Expand Down
33 changes: 13 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,33 @@ jobs:
- name: Checkout 🛎
uses: actions/checkout@master

- name: Setup pnpm 🦾
uses: pnpm/action-setup@v2
with:
version: 8.1.1

- name: Setup node env 🏗
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: 'pnpm'

- name: Setup Nuxt application 🥾
run: |
cp .github/.env.src src/.env

- name: Get yarn cache directory path 🛠
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache node_modules 📦
uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-v${{ matrix.node }}-yarn-

- name: Install dependencies 👨🏻‍💻
run: yarn install && yarn --cwd src install
- name: Install root + src dependencies 👨🏻‍💻
run: pnpm install --frozen-lockfile

- name: Run linter 👀
run: yarn lint
run: pnpm lint

- name: Run type checking 📚
run: yarn typecheck
run: pnpm typecheck

#- name: Run tests 🧪
# run: yarn test
# run: pnpm test

- name: Build app 🖥
run: yarn --cwd src build
run: pnpm --dir src build
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit ${1}
pnpm commitlint --edit ${1}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
26 changes: 10 additions & 16 deletions docs/0. Getting Started/0. Quick Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Prerequisites

Node 16+ (`node -v`)
Yarn 1.22+ (`yarn -v`)
pnpm 7.18+ (`pnpm -v`)

## Setup /src directory

Expand All @@ -19,28 +19,32 @@ Create a `.env` file by copying the `.env.dist` file, then edit this with your o
cp .env.dist .env
```

And lastly ensure you've installed the node modules using `yarn`:
And lastly ensure you've installed the node modules using `pnpm`:

```
yarn install
pnpm install
```

This will install node_modules in all pnpm workspaces, including /src.

If you haven't set your `src/.env` file up already, you will likely receive errors from this method due to some post-install scripts.

### Start up

The app has two build modes: development and production.

Start the dev server for watching and hot module reloading:

```
yarn dev -o
pnpm dev -o
# The -o flag opens a new browser window automatically. Remove if you already have a window open
```

Or build for production and run the production server:

```
yarn build
yarn start
pnpm build
pnpm start
```

### Next Steps
Expand All @@ -50,13 +54,3 @@ Now that you're up and running, you are ready to start building more of this app
- Learn about the [application concepts](../1.%20Guide/1.%20Concepts/0.%20Overview.md)
- Learn about the [application features](../1.%20Guide/2.%20Features/0.%20Overview.md)
- Learn about the [directory structure](../1.%20Guide/3.%20Directory%20Structure/0.%20Overview.md)

## Global Setup

Note that it is possible to install all node_modules in all sub-directories from the root of this project directory.

```
yarn install:all
```

If you haven't set your `.env` files up already, you will likely receive errors from this method due to some post-install scripts.
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
'./src/*.{ts,tsx,vue}': [
() => 'yarn --cwd src nuxi typecheck --noEmit', // Have to run typecheck on all files via a function - can't check just staged files
() => 'pnpm -r typecheck', // Have to run typecheck on all files via a function - can't check just staged files
'eslint --fix',
],
'./src/*.{js,jsx}': 'eslint --fix',
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"browserslist": [
"> 1%",
"last 4 versions",
Expand All @@ -10,19 +10,19 @@
"not dead"
],
"scripts": {
"install:all": "for D in */; do yarn --cwd \"${D}\"; done",
"lint": "eslint --cache src",
"lint:fix": "eslint --cache --fix src",
"typecheck": "yarn --cwd src nuxi typecheck --noEmit",
"typecheck": "pnpm -r typecheck",
"prepare": "husky install"
},
"dependencies": {},
"devDependencies": {
"@commitlint/cli": "^17.1.2",
"@hexdigital/config-commitlint": "^1.0.1",
"@hexdigital/eslint-config": "^1.0.6",
"@hexdigital/eslint-config": "^1.3.0",
"eslint": "^8.23.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3"
}
},
"private": true,
"license": "All Rights Reserved"
}
Loading