Skip to content

Commit

Permalink
feat: nuxt-scripts integration (#306)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Huang <julien.huang@leetchi.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Jonas Thelemann <e-mail@jonas-thelemann.de>
  • Loading branch information
4 people authored Jun 28, 2024
1 parent 71172d5 commit 44cb64c
Show file tree
Hide file tree
Showing 12 changed files with 4,474 additions and 4,046 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,22 @@ jobs:
- name: 🚧 Set up project
run: pnpm dev:prepare

- name: 🚧 Prepare playground
# prepare the playground for tests
run: pnpm playground:prepare

- name: 🔠 Lint project
run: pnpm run lint

- name: 🧪 Test project
run: pnpm test -- --coverage

- name: 💪 Test types
run: pnpm test:types

- name: 🛠 Build project
run: pnpm build

- name: 💪 Test types
run: pnpm test:types

- name: 🟩 Coverage
uses: codecov/codecov-action@v4

Expand Down
2 changes: 2 additions & 0 deletions .nuxtrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
typescript.includeWorkspace=true
modules[]=@nuxt/scripts
modules[]=@nuxtjs/turnstile
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

1. First, [follow these steps](https://developers.cloudflare.com/turnstile/get-started/) to obtain a free sitekey and secret key from Cloudflare.

2. Install and add `@nuxtjs/turnstile` to your `nuxt.config`.
1. Install `@nuxt/scripts` as a dependency - see [docs](https://scripts.nuxt.com/) for more info if you're interested.

1. Install and add `@nuxtjs/turnstile` to your `nuxt.config`.

```bash
npx nuxi@latest module add turnstile
Expand Down
41 changes: 25 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
".": {
"import": "./dist/module.mjs",
"require": "./dist/module.cjs"
},
"./runtime/*": {
"import": "./dist/runtime/*",
"require": "./dist/runtime/*"
}
},
"main": "./dist/module.cjs",
Expand All @@ -35,7 +39,8 @@
"build": "pnpm dev:prepare && nuxt-module-build",
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "pnpm nuxt-module-build --stub && nuxt-module-build prepare && nuxi prepare playground",
"dev:prepare": "pnpm nuxt-module-build --stub && nuxi prepare",
"playground:prepare": "nuxi prepare playground",
"docs:dev": "nuxi dev docs",
"docs:build": "nuxi generate docs",
"lint": "pnpm lint:all:eslint",
Expand All @@ -48,33 +53,37 @@
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
},
"dependencies": {
"@nuxt/kit": "^3.7.0",
"@nuxt/kit": "^3.11.2",
"defu": "^6.1.2",
"pathe": "^1.1.1"
},
"devDependencies": {
"@nuxt/eslint-config": "0.3.13",
"@nuxt/module-builder": "0.6.0",
"@nuxt/schema": "3.8.2",
"@nuxt/test-utils": "3.8.1",
"@types/node": "20.14.8",
"@vitest/coverage-v8": "1.0.1",
"@nuxt/module-builder": "0.8.0",
"@nuxt/schema": "3.12.2",
"@nuxt/scripts": "0.5.1",
"@nuxt/test-utils": "3.13.1",
"@types/cloudflare-turnstile": "0.1.5",
"@types/node": "20.14.9",
"@vitest/coverage-v8": "1.6.0",
"bumpp": "9.4.1",
"conventional-changelog-conventionalcommits": "8.0.0",
"eslint": "9.5.0",
"expect-type": "0.19.0",
"get-port-please": "3.0.2",
"lint-staged": "15.0.2",
"nuxt": "3.8.2",
"playwright": "1.37.1",
"typescript": "5.1.6",
"vitest": "1.0.1",
"vue": "3.3.12",
"get-port-please": "3.1.2",
"lint-staged": "15.2.7",
"nuxt": "3.12.2",
"playwright": "1.45.0",
"typescript": "5.5.2",
"vitest": "1.6.0",
"vue-tsc": "2.0.22"
},
"peerDependencies": {
"@nuxt/scripts": ">=0.5.1"
},
"resolutions": {
"@nuxtjs/turnstile": "link:.",
"@nuxt/kit": "3.8.2"
"@nuxt/kit": "^3.11.2",
"@nuxtjs/turnstile": "link:."
},
"packageManager": "pnpm@9.4.0"
}
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"devDependencies": {
"@nuxtjs/turnstile": "link:..",
"nuxt": "3.8.2"
"nuxt": "3.12.2"
}
}
Loading

0 comments on commit 44cb64c

Please sign in to comment.