Skip to content

Commit 8711e62

Browse files
committed
init
0 parents  commit 8711e62

File tree

25 files changed

+9327
-0
lines changed

25 files changed

+9327
-0
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

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lintAndCheck:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: npm i -g --force corepack && corepack enable
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Install dependencies
23+
run: npx nypm@latest i
24+
25+
- name: Lint
26+
run: npm run lint
27+
28+
- name: Playground prepare
29+
run: npm run dev:prepare
30+
31+
- name: Test
32+
run: npm run test

.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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.experimental.useFlatConfig": true
3+
}

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!--
2+
Get your module up and running quickly.
3+
4+
Find and replace all on all files (CMD+SHIFT+F):
5+
- Name: My Module
6+
- Package name: my-module
7+
- Description: My new Nuxt module
8+
-->
9+
10+
# Nuxt LLMs
11+
12+
[![npm version][npm-version-src]][npm-version-href]
13+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
14+
[![License][license-src]][license-href]
15+
[![Nuxt][nuxt-src]][nuxt-href]
16+
17+
My new Nuxt module for doing amazing things.
18+
19+
- [&nbsp;Release Notes](/CHANGELOG.md)
20+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
21+
<!-- - [📖 &nbsp;Documentation](https://example.com) -->
22+
23+
## Features
24+
25+
<!-- Highlight some of the features your module provide here -->
26+
-&nbsp;Foo
27+
- 🚠 &nbsp;Bar
28+
- 🌲 &nbsp;Baz
29+
30+
## Quick Setup
31+
32+
Install the module to your Nuxt application with one command:
33+
34+
```bash
35+
npx nuxi module add my-module
36+
```
37+
38+
That's it! You can now use My Module in your Nuxt app ✨
39+
40+
41+
## Contribution
42+
43+
<details>
44+
<summary>Local development</summary>
45+
46+
```bash
47+
# Install dependencies
48+
npm install
49+
50+
# Generate type stubs
51+
npm run dev:prepare
52+
53+
# Develop with the playground
54+
npm run dev
55+
56+
# Build the playground
57+
npm run dev:build
58+
59+
# Run ESLint
60+
npm run lint
61+
62+
# Run Vitest
63+
npm run test
64+
npm run test:watch
65+
66+
# Release new version
67+
npm run release
68+
```
69+
70+
</details>
71+
72+
73+
<!-- Badges -->
74+
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
75+
[npm-version-href]: https://npmjs.com/package/my-module
76+
77+
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
78+
[npm-downloads-href]: https://npm.chart.dev/my-module
79+
80+
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
81+
[license-href]: https://npmjs.com/package/my-module
82+
83+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
84+
[nuxt-href]: https://nuxt.com

eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @ts-check
2+
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
3+
4+
// Run `npx @eslint/config-inspector` to inspect the resolved config interactively
5+
export default createConfigForNuxt({
6+
features: {
7+
// Rules for module authors
8+
tooling: true,
9+
// Rules for formatting
10+
stylistic: true,
11+
},
12+
dirs: {
13+
src: [
14+
'./playground',
15+
],
16+
},
17+
})
18+
.append(
19+
// your custom flat config here...
20+
)

package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@nuxtjs/llms",
3+
"version": "1.0.0",
4+
"description": "My new Nuxt module",
5+
"repository": "your-org/my-module",
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 build",
22+
"dev": "nuxi dev playground",
23+
"dev:build": "nuxi build playground",
24+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && 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+
"typecheck": "nuxi typecheck",
28+
"test": "vitest run",
29+
"test:watch": "vitest watch",
30+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
31+
"verify": "npm run dev:prepare && npm run lint && npm run test && npm run typecheck"
32+
},
33+
"dependencies": {
34+
"@nuxt/kit": "^3.15.4"
35+
},
36+
"devDependencies": {
37+
"@nuxtjs/llms": "link:.",
38+
"@nuxt/devtools": "^2.1.0",
39+
"@nuxt/eslint-config": "^1.0.1",
40+
"@nuxt/module-builder": "^0.8.4",
41+
"@nuxt/schema": "^3.15.4",
42+
"@nuxt/test-utils": "^3.15.4",
43+
"@types/node": "latest",
44+
"changelogen": "^0.5.7",
45+
"eslint": "^9.20.1",
46+
"nuxt": "^3.15.4",
47+
"typescript": "~5.7.3",
48+
"vitest": "^3.0.5",
49+
"vue-tsc": "^2.2.2"
50+
},
51+
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
52+
}

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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default defineNuxtConfig({
2+
modules: ['../src/module'],
3+
devtools: { enabled: true },
4+
})

0 commit comments

Comments
 (0)