nuxt-echarts 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 - present, Yue JIN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # Nuxt ECharts
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 Module for Apache ECharts™
9
+
10
+ > 🚧 **Work in Progress**
11
+ >
12
+ > Nuxt ECharts is currently in active development and not usable for production yet.
13
+
14
+ - [✨  Release Notes](/CHANGELOG.md)
15
+ <!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/nuxt-echarts?file=playground%2Fapp.vue) -->
16
+ <!-- - [📖 &nbsp;Documentation](https://example.com) -->
17
+
18
+ ## Features
19
+
20
+ <!-- Highlight some of the features your module provide here -->
21
+
22
+ - ⛰ &nbsp;Foo
23
+ - 🚠 &nbsp;Bar
24
+ - 🌲 &nbsp;Baz
25
+
26
+ ## Quick Setup
27
+
28
+ Install the module to your Nuxt application with one command:
29
+
30
+ ```bash
31
+ npx nuxi module add nuxt-echarts
32
+ ```
33
+
34
+ That's it! You can now use Nuxt ECharts in your Nuxt app ✨
35
+
36
+ ## Contribution
37
+
38
+ <details>
39
+ <summary>Local development</summary>
40
+
41
+ ```bash
42
+ # Install dependencies
43
+ npm install
44
+
45
+ # Generate type stubs
46
+ npm run dev:prepare
47
+
48
+ # Develop with the playground
49
+ npm run dev
50
+
51
+ # Build the playground
52
+ npm run dev:build
53
+
54
+ # Run ESLint
55
+ npm run lint
56
+
57
+ # Run Vitest
58
+ npm run test
59
+ npm run test:watch
60
+
61
+ # Release new version
62
+ npm run release
63
+ ```
64
+
65
+ </details>
66
+
67
+ <!-- Badges -->
68
+
69
+ [npm-version-src]: https://img.shields.io/npm/v/nuxt-echarts/latest.svg?style=flat&colorA=020420&colorB=00DC82
70
+ [npm-version-href]: https://npmjs.com/package/nuxt-echarts
71
+ [npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-echarts.svg?style=flat&colorA=020420&colorB=00DC82
72
+ [npm-downloads-href]: https://npmjs.com/package/nuxt-echarts
73
+ [license-src]: https://img.shields.io/npm/l/nuxt-echarts.svg?style=flat&colorA=020420&colorB=00DC82
74
+ [license-href]: https://npmjs.com/package/nuxt-echarts
75
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
76
+ [nuxt-href]: https://nuxt.com
@@ -0,0 +1,5 @@
1
+ module.exports = function(...args) {
2
+ return import('./module.mjs').then(m => m.default.call(this, ...args))
3
+ }
4
+ const _meta = module.exports.meta = require('./module.json')
5
+ module.exports.getMeta = () => Promise.resolve(_meta)
@@ -0,0 +1,7 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ }
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
6
+
7
+ export { type ModuleOptions, _default as default };
@@ -0,0 +1,7 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ }
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
6
+
7
+ export { type ModuleOptions, _default as default };
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "nuxt-echarts",
3
+ "configKey": "echarts",
4
+ "version": "0.0.1",
5
+ "builder": {
6
+ "@nuxt/module-builder": "0.6.0",
7
+ "unbuild": "2.0.0"
8
+ }
9
+ }
@@ -0,0 +1,16 @@
1
+ import { defineNuxtModule, createResolver, addPlugin } from '@nuxt/kit';
2
+
3
+ const module = defineNuxtModule({
4
+ meta: {
5
+ name: "nuxt-echarts",
6
+ configKey: "echarts"
7
+ },
8
+ // Default configuration options of the Nuxt module
9
+ defaults: {},
10
+ setup(_options, _nuxt) {
11
+ const resolver = createResolver(import.meta.url);
12
+ addPlugin(resolver.resolve("./runtime/plugin"));
13
+ }
14
+ });
15
+
16
+ export { module as default };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { defineNuxtPlugin } from "#app";
2
+ export default defineNuxtPlugin((_nuxtApp) => {
3
+ console.log("Plugin injected by nuxt-echarts!");
4
+ });
@@ -0,0 +1,16 @@
1
+
2
+ import type { ModuleOptions } from './module.js'
3
+
4
+
5
+ declare module '@nuxt/schema' {
6
+ interface NuxtConfig { ['echarts']?: Partial<ModuleOptions> }
7
+ interface NuxtOptions { ['echarts']?: ModuleOptions }
8
+ }
9
+
10
+ declare module 'nuxt/schema' {
11
+ interface NuxtConfig { ['echarts']?: Partial<ModuleOptions> }
12
+ interface NuxtOptions { ['echarts']?: ModuleOptions }
13
+ }
14
+
15
+
16
+ export type { ModuleOptions, default } from './module.js'
@@ -0,0 +1,16 @@
1
+
2
+ import type { ModuleOptions } from './module'
3
+
4
+
5
+ declare module '@nuxt/schema' {
6
+ interface NuxtConfig { ['echarts']?: Partial<ModuleOptions> }
7
+ interface NuxtOptions { ['echarts']?: ModuleOptions }
8
+ }
9
+
10
+ declare module 'nuxt/schema' {
11
+ interface NuxtConfig { ['echarts']?: Partial<ModuleOptions> }
12
+ interface NuxtOptions { ['echarts']?: ModuleOptions }
13
+ }
14
+
15
+
16
+ export type { ModuleOptions, default } from './module'
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "nuxt-echarts",
3
+ "version": "0.0.1",
4
+ "description": "Nuxt Module for Apache ECharts™",
5
+ "author": "Yue JIN <yuejin13@fudan.edu.cn>",
6
+ "repository": "kingyue737/nuxt-echarts",
7
+ "license": "MIT",
8
+ "type": "module",
9
+ "packageManager": "pnpm@9.1.3",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/types.d.ts",
13
+ "import": "./dist/module.mjs",
14
+ "require": "./dist/module.cjs"
15
+ }
16
+ },
17
+ "main": "./dist/module.cjs",
18
+ "types": "./dist/types.d.ts",
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "scripts": {
23
+ "prepack": "nuxt-module-build build",
24
+ "dev": "nuxi dev playground",
25
+ "dev:build": "nuxi build playground",
26
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
27
+ "release": "pnpm run lint && pnpm run test && pnpm run prepack && changelogen --release && npm publish --registry=\"https://registry.npmjs.org/\" && git push --follow-tags",
28
+ "lint": "eslint . --fix",
29
+ "format": "prettier . --write",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest watch",
32
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
33
+ },
34
+ "dependencies": {
35
+ "@nuxt/kit": "^3.11.2"
36
+ },
37
+ "devDependencies": {
38
+ "@nuxt/devtools": "^1.3.2",
39
+ "@nuxt/eslint-config": "^0.3.13",
40
+ "@nuxt/module-builder": "^0.6.0",
41
+ "@nuxt/schema": "^3.11.2",
42
+ "@nuxt/test-utils": "^3.13.1",
43
+ "@types/node": "^20.12.13",
44
+ "changelogen": "^0.5.5",
45
+ "eslint": "^9.3.0",
46
+ "nuxt": "^3.11.2",
47
+ "prettier": "^3.2.5",
48
+ "typescript": "latest",
49
+ "vitest": "^1.6.0",
50
+ "vue-tsc": "^2.0.19"
51
+ },
52
+ "pnpm": {
53
+ "peerDependencyRules": {
54
+ "allowedVersions": {
55
+ "@typescript-eslint/eslint-plugin>eslint": "^9.0.0",
56
+ "@typescript-eslint/parser>eslint": "^9.0.0",
57
+ "@typescript-eslint/type-utils>eslint": "^9.0.0",
58
+ "@typescript-eslint/utils>eslint": "^9.0.0"
59
+ }
60
+ }
61
+ }
62
+ }