Skip to content

Commit 62ccded

Browse files
committed
initial commit
0 parents  commit 62ccded

18 files changed

+6495
-0
lines changed

.editorconfig

+12
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

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
package.json
4+
tsconfig.json

.eslintrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": [
3+
"@nuxtjs/eslint-config-typescript"
4+
],
5+
"rules": {
6+
"@typescript-eslint/no-unused-vars": [
7+
"off"
8+
]
9+
}
10+
}

.gitignore

+56
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+
.vercel_build_output
23+
.build-*
24+
.env
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

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-workspace-root-checks=true
2+
shamefully-hoist=true

.nuxtrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports.autoImport=false
2+
typescript.includeWorkspace=true

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Nuxt Module
2+
3+
## Development
4+
5+
- Run `npm run dev:prepare` to generate type stubs.
6+
- Use `npm run dev` to start [playground](./playground) in development mode.

package.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "my-module",
3+
"version": "1.0.0",
4+
"license": "MIT",
5+
"type": "module",
6+
"exports": {
7+
".": {
8+
"import": "./dist/module.mjs",
9+
"require": "./dist/module.cjs"
10+
}
11+
},
12+
"main": "./dist/module.cjs",
13+
"types": "./dist/types.d.ts",
14+
"files": [
15+
"dist"
16+
],
17+
"scripts": {
18+
"prepack": "nuxt-module-build",
19+
"dev": "nuxi dev playground",
20+
"dev:build": "nuxi build playground",
21+
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
22+
"lint": "eslint .",
23+
"lint:fix": "eslint . --fix"
24+
},
25+
"dependencies": {
26+
"@nuxt/kit": "^3.0.0",
27+
"es-module-lexer": "^1.1.0",
28+
"fast-glob": "^3.2.12",
29+
"h3": "^1.0.1",
30+
"ofetch": "^1.0.0",
31+
"pathe": "^1.0.0"
32+
},
33+
"devDependencies": {
34+
"@nuxt/module-builder": "^0.2.1",
35+
"@nuxt/schema": "^3.0.0",
36+
"@nuxtjs/eslint-config-typescript": "^12.0.0",
37+
"eslint": "^8.28.0",
38+
"nuxt": "^3.0.0"
39+
}
40+
}

playground/app.vue

+8
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

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineNuxtConfig } from 'nuxt/config'
2+
import MyModule from '..'
3+
4+
export default defineNuxtConfig({
5+
modules: [
6+
MyModule
7+
],
8+
myModule: {
9+
addPlugin: true
10+
}
11+
})

playground/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"private": true,
3+
"name": "my-module-playground"
4+
}

0 commit comments

Comments
 (0)