@anweb/nuxt-ancore 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -56
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -2
- package/dist/runtime/utils/api.d.ts +3 -0
- package/dist/runtime/utils/api.js +10 -0
- package/package.json +4 -2
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.js +0 -4
package/README.md
CHANGED
|
@@ -1,73 +1,28 @@
|
|
|
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
|
-
# My Module
|
|
1
|
+
# AnCore module for Nuxt
|
|
11
2
|
|
|
12
3
|
[![npm version][npm-version-src]][npm-version-href]
|
|
13
4
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
-
[![License][license-src]][license-href]
|
|
15
5
|
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
6
|
|
|
17
7
|
My new Nuxt module for doing amazing things.
|
|
18
8
|
|
|
19
9
|
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
-
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
-
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
10
|
|
|
25
|
-
<!-- Highlight some of the features your module provide here -->
|
|
26
|
-
- ⛰ Foo
|
|
27
|
-
- 🚠 Bar
|
|
28
|
-
- 🌲 Baz
|
|
29
11
|
|
|
30
12
|
## Quick Setup
|
|
31
13
|
|
|
32
14
|
Install the module to your Nuxt application with one command:
|
|
33
15
|
|
|
34
16
|
```bash
|
|
35
|
-
|
|
17
|
+
npm i @anweb/nuxt-ancore
|
|
36
18
|
```
|
|
37
19
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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>
|
|
20
|
+
Then, add it to your nuxt.config.ts:
|
|
21
|
+
```ts
|
|
22
|
+
export default defineNuxtConfig({
|
|
23
|
+
modules: ['@anweb/nuxt-ancore']
|
|
24
|
+
})
|
|
25
|
+
```
|
|
71
26
|
|
|
72
27
|
|
|
73
28
|
<!-- Badges -->
|
|
@@ -77,8 +32,5 @@ That's it! You can now use My Module in your Nuxt app ✨
|
|
|
77
32
|
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
33
|
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
34
|
|
|
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
35
|
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
84
36
|
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
1
|
+
import { defineNuxtModule, createResolver, addImports } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const module = defineNuxtModule({
|
|
4
4
|
meta: {
|
|
@@ -9,7 +9,10 @@ const module = defineNuxtModule({
|
|
|
9
9
|
defaults: {},
|
|
10
10
|
setup(_options, _nuxt) {
|
|
11
11
|
const resolver = createResolver(import.meta.url);
|
|
12
|
-
|
|
12
|
+
addImports({
|
|
13
|
+
name: "api",
|
|
14
|
+
from: resolver.resolve("runtime/utils/api")
|
|
15
|
+
});
|
|
13
16
|
}
|
|
14
17
|
});
|
|
15
18
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { NitroFetchOptions, NitroFetchRequest } from 'nitropack';
|
|
2
|
+
declare const _default: <TData = unknown, TError = unknown>(request: NitroFetchRequest, opts: NitroFetchOptions<string>) => Promise<import("nitropack").TypedInternalResponse<NitroFetchRequest, TData, "get">>;
|
|
3
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anweb/nuxt-ancore",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "AnCore Nuxt module",
|
|
5
5
|
"repository": "https://github.com/ANLTD/ancore",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
28
28
|
"dev:build": "nuxi build playground",
|
|
29
29
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
30
|
-
"release": "npm run prepack && changelogen --release && npm publish --access public && git push --follow-tags"
|
|
30
|
+
"release:patch": "npm run prepack && changelogen --bump patch --release && npm publish --access public && git push --follow-tags",
|
|
31
|
+
"release:minor": "npm run prepack && changelogen --bump minor --release && npm publish --access public && git push --follow-tags",
|
|
32
|
+
"release:major": "npm run prepack && changelogen --bump major --release && npm publish --access public && git push --follow-tags"
|
|
31
33
|
},
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@nuxt/kit": "^4.0.0"
|
package/dist/runtime/plugin.d.ts
DELETED
package/dist/runtime/plugin.js
DELETED