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

feat: nuxt-scripts integration #306

Merged
merged 40 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a1f0cf7
WIP
huang-julien Apr 7, 2024
d8c8519
test: remove unecessary assertion
huang-julien Apr 8, 2024
ed5aeed
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
huang-julien Apr 8, 2024
8d45424
test: prefer looking for the challenge platform
huang-julien Apr 8, 2024
2d0627e
fix: feedback
huang-julien Apr 14, 2024
1c8e28c
feat: use registry hook
huang-julien Apr 14, 2024
7a57204
fix: remove $turnstile usage in component
huang-julien Apr 14, 2024
2640bcd
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
huang-julien Apr 17, 2024
3275acb
feat: remove semver and use @nuxt/scripts for nuxt 3
huang-julien Apr 17, 2024
9979c38
types and update nuxt scripts
huang-julien May 15, 2024
8e80b47
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
huang-julien May 15, 2024
5ea5bba
feat: move to useRegistryScript
huang-julien May 15, 2024
87b8eae
chore: prepare root in dev:prepare
huang-julien May 15, 2024
286f969
ci: prepare playground for tests
huang-julien May 15, 2024
f7ae2fb
chore: update nuxt scripts
Jun 4, 2024
ed1757b
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
Jun 4, 2024
12b86d4
chore: update nuxt script
huang-julien Jun 9, 2024
d214bd6
Merge branch 'feat/nuxt-scripts' of https://github.com/huang-julien/t…
huang-julien Jun 9, 2024
b113034
fix: update nuxt scripts
huang-julien Jun 9, 2024
ce546f2
chore: update nuxt scripts
huang-julien Jun 15, 2024
47f23d0
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
huang-julien Jun 15, 2024
eb9ec86
chore: revert tsconfig changes
huang-julien Jun 15, 2024
b98d7f7
chore: space
huang-julien Jun 15, 2024
339d5fa
feat: add trigger
huang-julien Jun 15, 2024
e53c829
chore: remove resolutions
huang-julien Jun 15, 2024
22dadba
ci: move type tests after prepack
huang-julien Jun 15, 2024
8115435
chore: refactor tests from @GalacticHypernova
huang-julien Jun 15, 2024
44eb870
chore: remove old implementation and add version constraint
huang-julien Jun 21, 2024
a921b0d
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
huang-julien Jun 21, 2024
eccdbfd
Merge remote-tracking branch 'origin/main' into feat/nuxt-scripts
huang-julien Jun 27, 2024
22bdd87
chore: remove prettier
danielroe Jun 27, 2024
e8587b0
chore: revert some changes
danielroe Jun 27, 2024
a23af92
chore: dedupe and bump vue version
danielroe Jun 27, 2024
cbc2efe
refactor: add import outside of hook
danielroe Jun 27, 2024
58abcea
chore: add `@nuxt/scripts` peer dependency
danielroe Jun 27, 2024
3cb3f3a
docs: update docs to mention `@nuxt/scripts`
danielroe Jun 27, 2024
0f8269c
fix: fix trigger, remove vue
huang-julien Jun 27, 2024
35eddbe
Merge branch 'feat/nuxt-scripts' of https://github.com/huang-julien/t…
huang-julien Jun 27, 2024
95e1fa1
chore(deps): update
dargmuesli Jun 28, 2024
b9ac0d7
fix(component): import composable
dargmuesli Jun 28, 2024
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
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