Skip to content

Commit

Permalink
Switch to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
SavageCore committed May 13, 2024
1 parent 567c53b commit a1e66a6
Show file tree
Hide file tree
Showing 7 changed files with 7,992 additions and 12,092 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install pnpm 📦
uses: pnpm/action-setup@v3
with:
version: 'latest'

- name: Setup Node.js 🛠️
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Update npm 📦
run: npm install -g npm@latest
cache: 'pnpm'

- name: Install dependencies 📦
run: |
npm ci
pnpm install
- name: Lint 🧹
run: |
npm run lint
pnpm lint
pnpm lint:styles
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install pnpm 📦
uses: pnpm/action-setup@v3
with:
version: 'latest'

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

- name: Install and Build 🔧
run: |
npm ci
npm run build
pnpm install
pnpm build
- name: Create .nojekyll file
run: touch dist/.nojekyll
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install pnpm 📦
uses: pnpm/action-setup@v3
with:
version: 'latest'

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

- name: Install dependencies 📦
run: |
npm ci
pnpm install
- name: Test 🧪
run: |
npm run test:coverage
pnpm test:coverage
- name: Upload coverage reports to Codecov 📊
uses: codecov/codecov-action@v4
Expand Down
6 changes: 3 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
npm run lint:styles
npm run lint
npm test
pnpm lint
pnpm lint:styles
pnpm test
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ This template is based on the official [Vite + Svelte template](https://github.c

## Packages added to the template

* [ESLint](https://eslint.org/)
* [Prettier](https://prettier.io/)
* [Husky](https://github.com/typicode/husky)
* [Vitest](https://vitest.dev/)
* [Pico.css](https://picocss.com/)
* [svelte-i18n](https://github.com/kaisermann/svelte-i18n)
* [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess)
* [prettier-plugin-css-order](https://github.com/Siilwyn/prettier-plugin-css-order)
* [sass](https://sass-lang.com/)
* [vite-plugin-pwa](https://vite-pwa-org.netlify.app/)
* [autoprefixer](https://github.com/postcss/autoprefixer)
* [vite-plugin-mkcert](https://www.npmjs.com/package/vite-plugin-mkcert)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Husky](https://github.com/typicode/husky)
- [Vitest](https://vitest.dev/)
- [Pico.css](https://picocss.com/)
- [svelte-i18n](https://github.com/kaisermann/svelte-i18n)
- [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess)
- [prettier-plugin-css-order](https://github.com/Siilwyn/prettier-plugin-css-order)
- [sass](https://sass-lang.com/)
- [vite-plugin-pwa](https://vite-pwa-org.netlify.app/)
- [autoprefixer](https://github.com/postcss/autoprefixer)
- [vite-plugin-mkcert](https://www.npmjs.com/package/vite-plugin-mkcert)

## Recommended IDE Setup

Expand All @@ -30,11 +30,11 @@ This template is based on the official [Vite + Svelte template](https://github.c
## Getting started

```bash
npx tiged "SavageCore/vite-svelte-starter" my-app
pnpm dlx tiged "SavageCore/vite-svelte-starter" my-app
cd my-app
npm install
npm run dev # local access
npm run dev:remote # lan access
pnpm install
pnpm dev # local access
pnpm dev:remote # lan access
```

Note: On first run, you may be prompted for sudo access to install `vite-plugin-mkcert` certificates.
Expand All @@ -51,8 +51,8 @@ This template is configured to publish to GitHub Pages. To publish your app push

2. Set the correct `base` in `vite.config.ts`.

If you are deploying to `https://<USERNAME>.github.io/`, you can omit base as it defaults to '/'.
If you are deploying to `https://<USERNAME>.github.io/`, you can omit base as it defaults to '/'.

If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, for example your repository is at `https://github.com/<USERNAME>/<REPO>`, then set base to `'/<REPO>/'`.
If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, for example your repository is at `https://github.com/<USERNAME>/<REPO>`, then set base to `'/<REPO>/'`.

See [Vite Docs](https://vitejs.dev/guide/static-deploy.html#github-pages) for more information.
Loading

0 comments on commit a1e66a6

Please sign in to comment.