Skip to content

Commit

Permalink
feat!: update templates to use Vite 6 and latest framework changes (#30)
Browse files Browse the repository at this point in the history
* feat!: update templates to use Vite 6 and latest framework changes

* chore: update `vite.dev` links

* docs: include notes about the new version in the usage section of the README file
  • Loading branch information
userquin authored Jan 24, 2025
1 parent 54226c7 commit f49a33e
Show file tree
Hide file tree
Showing 117 changed files with 2,105 additions and 1,369 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: "pnpm"
cache: pnpm
- run: pnpm install
- run: pnpm build
- run: pnpx pkg-pr-new publish --compact --no-template --pnpm
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ PWA Templates

## 🦄 Usage

> Version v0.7.0: updated all the templates to use **Vite 6**, including also the latest frameworks changes.
> Use version v0.6.0 for **Vite 5** and previous versions of the frameworks.
Since the package name begins with `create-`, it is considered a project generator and can be run simply as `@vite-pwa/pwa`.

This command launches an interactive questionnaire in the command line for configuring different parts of the project.
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pending tasks

- [ ] Unify templates: right now `vanilla` and `vanilla-ts` including stuff differently
- [ ] Unify templates: right now `vanilla` and `vanilla-ts` including stuff differently
- [ ] Extract utilities from vanilla customizations to manipulate stuff: for example `vite.config.[j|t]s`
- [x] `vanilla` and `vanilla-ts` templates
- [x] `vue` and `vue-ts` templates
Expand Down
4 changes: 2 additions & 2 deletions __tests__/cli.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { join } from 'node:path'
import type { ExecaSyncReturnValue, SyncOptions } from 'execa'
import { join } from 'node:path'
import { execaCommandSync } from 'execa'
import fs from 'fs-extra'
import { afterEach, beforeAll, expect, it } from 'vitest'
Expand Down Expand Up @@ -57,7 +57,7 @@ it('prompts for the framework on not supplying a value for --template', () => {
it('prompts for the framework on supplying an invalid template', () => {
const { stdout } = run([projectName, '--template', 'unknown'])
expect(stdout).toContain(
`"unknown" isn't a valid template. Please choose from below:`,
`"unknown" isn't a valid template. Please choose from below:`,
)
})

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vite-pwa/create-pwa",
"type": "module",
"version": "0.5.0",
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.15.4",
"description": "PWA Templates",
"author": "antfu <anthonyfu117@hotmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -36,7 +36,7 @@
"templates"
],
"engines": {
"node": "^18.0.0 || >=20.0.0"
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
},
"scripts": {
"dev": "unbuild --stub",
Expand All @@ -47,7 +47,7 @@
"release": "bumpp && npm publish"
},
"devDependencies": {
"@antfu/eslint-config": "^2.16.1",
"@antfu/eslint-config": "^3.16.0",
"@antfu/ni": "^0.21.12",
"@types/cross-spawn": "^6.0.6",
"@types/fs-extra": "^11.0.4",
Expand All @@ -56,15 +56,15 @@
"@types/prompts": "^2.4.9",
"bumpp": "^9.4.1",
"cross-spawn": "^7.0.3",
"eslint": "^9.2.0",
"eslint-plugin-antfu": "^2.1.2",
"eslint": "^9.18.0",
"eslint-plugin-antfu": "^2.7.0",
"kolorist": "^1.8.0",
"magicast": "^0.3.4",
"minimist": "^1.2.8",
"package-manager-detector": "^0.2.2",
"package-manager-detector": "^0.2.8",
"prompts": "^2.4.2",
"tsx": "^4.9.1",
"typescript": "^5.6.3",
"typescript": "^5.7.3",
"unbuild": "^2.0.0",
"vitest": "^1.6.0"
}
Expand Down
Loading

0 comments on commit f49a33e

Please sign in to comment.