Skip to content

Commit 777dd22

Browse files
committed
chore: nuxi init -t module
1 parent 6b98d10 commit 777dd22

20 files changed

+299
-2
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
indent_style = space
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"root": true,
3+
"extends": ["@nuxt/eslint-config"]
4+
}

.gitignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Logs
5+
*.log*
6+
7+
# Temp directories
8+
.temp
9+
.tmp
10+
.cache
11+
12+
# Yarn
13+
**/.yarn/cache
14+
**/.yarn/*state*
15+
16+
# Generated dirs
17+
dist
18+
19+
# Nuxt
20+
.nuxt
21+
.output
22+
.data
23+
.vercel_build_output
24+
.build-*
25+
.netlify
26+
27+
# Env
28+
.env
29+
30+
# Testing
31+
reports
32+
coverage
33+
*.lcov
34+
.nyc_output
35+
36+
# VSCode
37+
.vscode/*
38+
!.vscode/settings.json
39+
!.vscode/tasks.json
40+
!.vscode/launch.json
41+
!.vscode/extensions.json
42+
!.vscode/*.code-snippets
43+
44+
# Intellij idea
45+
*.iml
46+
.idea
47+
48+
# OSX
49+
.DS_Store
50+
.AppleDouble
51+
.LSOverride
52+
.AppleDB
53+
.AppleDesktop
54+
Network Trash Folder
55+
Temporary Items
56+
.apdisk

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shamefully-hoist=true

.nuxtrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports.autoImport=false
2+
typescript.includeWorkspace=true

README.md

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,85 @@
1-
# nuxt-sentry
2-
Nuxt 3 module for Sentry
1+
# Nuxt Sentry
2+
3+
[![npm version][npm-version-src]][npm-version-href]
4+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5+
[![License][license-src]][license-href]
6+
[![Nuxt][nuxt-src]][nuxt-href]
7+
8+
Nuxt 3 module for Sentry.
9+
10+
- [ Release Notes](/CHANGELOG.md)
11+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/@falcondev-it/nuxt-sentry?file=playground%2Fapp.vue) -->
12+
<!-- - [📖 &nbsp;Documentation](https://example.com) -->
13+
14+
## Features
15+
16+
<!-- Highlight some of the features your module provide here -->
17+
-&nbsp;Foo
18+
- 🚠 &nbsp;Bar
19+
- 🌲 &nbsp;Baz
20+
21+
## Quick Setup
22+
23+
1. Add `@falcondev-it/nuxt-sentry` dependency to your project
24+
25+
```bash
26+
# Using pnpm
27+
pnpm add -D @falcondev-it/nuxt-sentry
28+
29+
# Using yarn
30+
yarn add --dev @falcondev-it/nuxt-sentry
31+
32+
# Using npm
33+
npm install --save-dev @falcondev-it/nuxt-sentry
34+
```
35+
36+
2. Add `@falcondev-it/nuxt-sentry` to the `modules` section of `nuxt.config.ts`
37+
38+
```js
39+
export default defineNuxtConfig({
40+
modules: [
41+
'@falcondev-it/nuxt-sentry'
42+
]
43+
})
44+
```
45+
46+
That's it! You can now use Nuxt Sentry in your Nuxt app ✨
47+
48+
## Development
49+
50+
```bash
51+
# Install dependencies
52+
npm install
53+
54+
# Generate type stubs
55+
npm run dev:prepare
56+
57+
# Develop with the playground
58+
npm run dev
59+
60+
# Build the playground
61+
npm run dev:build
62+
63+
# Run ESLint
64+
npm run lint
65+
66+
# Run Vitest
67+
npm run test
68+
npm run test:watch
69+
70+
# Release new version
71+
npm run release
72+
```
73+
74+
<!-- Badges -->
75+
[npm-version-src]: https://img.shields.io/npm/v/@falcondev-it/nuxt-sentry/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
76+
[npm-version-href]: https://npmjs.com/package/@falcondev-it/nuxt-sentry
77+
78+
[npm-downloads-src]: https://img.shields.io/npm/dm/@falcondev-it/nuxt-sentry.svg?style=flat&colorA=18181B&colorB=28CF8D
79+
[npm-downloads-href]: https://npmjs.com/package/@falcondev-it/nuxt-sentry
80+
81+
[license-src]: https://img.shields.io/npm/l/@falcondev-it/nuxt-sentry.svg?style=flat&colorA=18181B&colorB=28CF8D
82+
[license-href]: https://npmjs.com/package/@falcondev-it/nuxt-sentry
83+
84+
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
85+
[nuxt-href]: https://nuxt.com

package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@falcondev-it/nuxt-sentry",
3+
"version": "0.1.0",
4+
"description": "Nuxt 3 module for Sentry",
5+
"repository": "https://github.com/falcondev-it/nuxt-sentry",
6+
"license": "MIT",
7+
"type": "module",
8+
"exports": {
9+
".": {
10+
"types": "./dist/types.d.ts",
11+
"import": "./dist/module.mjs",
12+
"require": "./dist/module.cjs"
13+
}
14+
},
15+
"main": "./dist/module.cjs",
16+
"types": "./dist/types.d.ts",
17+
"files": [
18+
"dist"
19+
],
20+
"scripts": {
21+
"prepack": "nuxt-module-build",
22+
"dev": "nuxi dev playground",
23+
"dev:build": "nuxi build playground",
24+
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
25+
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
26+
"lint": "eslint .",
27+
"test": "vitest run",
28+
"test:watch": "vitest watch"
29+
},
30+
"dependencies": {
31+
"@nuxt/kit": "^3.6.5"
32+
},
33+
"devDependencies": {
34+
"@types/node": "^18.17.3",
35+
"@nuxt/devtools": "latest",
36+
"@nuxt/eslint-config": "^0.1.1",
37+
"@nuxt/module-builder": "^0.4.0",
38+
"@nuxt/schema": "^3.6.5",
39+
"@nuxt/test-utils": "^3.6.5",
40+
"changelogen": "^0.5.4",
41+
"eslint": "^8.46.0",
42+
"nuxt": "^3.6.5",
43+
"vitest": "^0.34.1"
44+
}
45+
}

playground/app.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<template>
2+
<div>
3+
Nuxt module playground!
4+
</div>
5+
</template>
6+
7+
<script setup>
8+
</script>

playground/nuxt.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default defineNuxtConfig({
2+
modules: ['../src/module'],
3+
myModule: {},
4+
devtools: { enabled: true }
5+
})

0 commit comments

Comments
 (0)