-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dfb3fd0
Showing
18 changed files
with
6,450 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 4 | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Dependencies | ||
node_modules | ||
|
||
# Logs | ||
*.log* | ||
|
||
# Temp directories | ||
.temp | ||
.tmp | ||
.cache | ||
|
||
# Yarn | ||
**/.yarn/cache | ||
**/.yarn/*state* | ||
|
||
# Generated dirs | ||
dist | ||
|
||
# Nuxt | ||
.nuxt | ||
.output | ||
.data | ||
.vercel_build_output | ||
.build-* | ||
.netlify | ||
|
||
# Env | ||
.env | ||
|
||
# Testing | ||
reports | ||
coverage | ||
*.lcov | ||
.nyc_output | ||
|
||
# VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/*.code-snippets | ||
|
||
# Intellij idea | ||
*.iml | ||
.idea | ||
|
||
# OSX | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Nuxt Inngest | ||
|
||
[![npm version][npm-version-src]][npm-version-href] | ||
[![npm downloads][npm-downloads-src]][npm-downloads-href] | ||
[![License][license-src]][license-href] | ||
[![Nuxt][nuxt-src]][nuxt-href] | ||
|
||
[Inngest](https://inngest.com) integration for [Nuxt](https://nuxt.com). | ||
|
||
- [✨ Release Notes](/CHANGELOG.md) | ||
|
||
## Quick Setup | ||
|
||
1. Add `nuxt-inngest` dependency to your project | ||
|
||
```bash | ||
# Using npm | ||
npm install --save-dev nuxt-inngest | ||
|
||
# Using pnpm | ||
pnpm add -D nuxt-inngest | ||
|
||
# Using yarn | ||
yarn add --dev nuxt-inngest | ||
|
||
# Using bun | ||
bun add --D nuxt-inngest | ||
``` | ||
|
||
2. Add `nuxt-inngest` to the `modules` section of `nuxt.config.ts` | ||
|
||
```js | ||
export default defineNuxtConfig({ | ||
modules: [ | ||
'nuxt-inngest' | ||
] | ||
}) | ||
``` | ||
|
||
Add the following configuration to your `.env` file replacing the value in `< >` with your Inngest API key. | ||
|
||
```ini | ||
NUXT_INNGEST_EVENT_KEY="<your_inngest_event_key>" | ||
``` | ||
|
||
That's it! You can now use Nuxt inngest in your Nuxt app ✨ | ||
|
||
## Development | ||
|
||
```bash | ||
# Install dependencies | ||
pnpm install | ||
|
||
# Generate type stubs | ||
pnpm run dev:prepare | ||
|
||
# Develop with the playground | ||
pnpm run dev | ||
|
||
# Build the playground | ||
pnpm run dev:build | ||
|
||
# Run checks | ||
pnpm run check | ||
|
||
# Run Vitest | ||
pnpm run test | ||
pnpm run test:watch | ||
|
||
# Release new version | ||
pnpm run release | ||
``` | ||
|
||
<!-- Badges --> | ||
[npm-version-src]: https://img.shields.io/npm/v/nuxt-inngest/latest.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[npm-version-href]: https://npmjs.com/package/nuxt-inngest | ||
|
||
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-inngest.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[npm-downloads-href]: https://npmjs.com/package/nuxt-inngest | ||
|
||
[license-src]: https://img.shields.io/npm/l/nuxt-inngest.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[license-href]: https://npmjs.com/package/nuxt-inngest | ||
|
||
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js | ||
[nuxt-href]: https://nuxt.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json", | ||
"files": { | ||
"ignore": [".nuxt", "node_modules", "dist"] | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "nuxt-inngest", | ||
"version": "0.0.0", | ||
"description": "Inngest integration for Nuxt", | ||
"repository": "nhedger/nuxt-inngest", | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/types.d.ts", | ||
"import": "./dist/module.mjs", | ||
"require": "./dist/module.cjs" | ||
} | ||
}, | ||
"main": "./dist/module.cjs", | ||
"types": "./dist/types.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"prepack": "nuxt-module-build prepare && nuxt-module-build build", | ||
"dev": "nuxi dev playground", | ||
"dev:build": "nuxi build playground", | ||
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground", | ||
"release": "pnpm run check && pnpm run prepack && changelogen --release && pnpm publish && git push --follow-tags", | ||
"check": "biome check --apply ." | ||
}, | ||
"dependencies": { | ||
"@nuxt/kit": "^3.8.1", | ||
"defu": "^6.1.3", | ||
"inngest": "^3.6.0" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.3.3", | ||
"@nuxt/devtools": "latest", | ||
"@nuxt/module-builder": "^0.5.3", | ||
"@nuxt/schema": "^3.8.1", | ||
"@types/node": "^20.8.10", | ||
"changelogen": "^0.5.5", | ||
"nuxt": "^3.8.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NUXT_inngest_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template> | ||
<div> | ||
Nuxt module playground! | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default defineNuxtConfig({ | ||
modules: ["../src/module"], | ||
inngest: { | ||
apiKey: "YOUR_API_KEY", | ||
}, | ||
devtools: { enabled: true }, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"private": true, | ||
"name": "nuxt-inngest-playground", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "nuxi dev", | ||
"build": "nuxi build", | ||
"generate": "nuxi generate" | ||
}, | ||
"devDependencies": { | ||
"nuxt": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default defineEventHandler(async () => { | ||
const { emails } = useinngest(); | ||
|
||
const result = await emails.send({ | ||
from: "Nicolas Hedger <nicolas@hedger.ch>", | ||
to: ["nicolas@hedger.ch"], | ||
subject: "Hello from Nuxt inngest", | ||
text: "Hello world!", | ||
}); | ||
|
||
console.log(result); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../.nuxt/tsconfig.server.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "./.nuxt/tsconfig.json" | ||
} |
Oops, something went wrong.