From c9efb6d0830e2bb6aee2b03ffac900597154d802 Mon Sep 17 00:00:00 2001 From: xieyaxin <1549469775@qq.com> Date: Thu, 15 Aug 2024 09:07:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev.ts | 2 +- package.json | 27 +++++++++++++++++++++------ pnpm-lock.yaml | 13 ++++++------- readme.md | 1 + src/index.ts | 3 --- 5 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 readme.md diff --git a/dev.ts b/dev.ts index cb110af..3136a41 100644 --- a/dev.ts +++ b/dev.ts @@ -1,5 +1,5 @@ import Vue from "vue"; -import { VaguerComponents } from "./dist/vaguer-button.js"; +import { VaguerComponents } from "./src"; import "./dist/style.css" Vue.use(VaguerComponents); diff --git a/package.json b/package.json index f3b2282..c983fd2 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,36 @@ { - "name": "vue2-somebuild", + "name": "vaguer", "type": "module", - "main": "./dist/vaguer-button.js", + "main": "./dist/vaguer.js", + "module": "./dist/vaguer.js", "typings": "./dist/index.d.ts", "scripts": { "watch": "somebuild build --watch", "dev": "somebuild dev", "build": "somebuild build" }, + "exports": { + ".": { + "import": "./dist/vaguer.js", + "require": "./dist/vaguer.cjs" + }, + "./style.css": { + "import": "./dist/style.css", + "require": "./dist/style.css" + } + }, + "files": [ + "dist" + ], "globals": { "vue": "Vue" }, - "dependencies": { - "vue": "2.6.14", - "vue-template-compiler": "2.6.14" + "peerDependencies": { + "vue": "<= 2.6.14" }, "devDependencies": { + "vue": "2.6.14", + "vue-template-compiler": "2.6.14", "@somebuild/build-component-vue2": "^0.0.6", "@somebuild/vite-config-vue2": "^1.0.1", "@types/node": "^20.12.10", @@ -27,4 +42,4 @@ "node": "18.17.1", "pnpm": "9.0.6" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8758283..3f44dd2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,13 +7,6 @@ settings: importers: .: - dependencies: - vue: - specifier: 2.6.14 - version: 2.6.14 - vue-template-compiler: - specifier: 2.6.14 - version: 2.6.14 devDependencies: '@somebuild/build-component-vue2': specifier: ^0.0.6 @@ -33,6 +26,12 @@ importers: somebuild: specifier: ^0.0.19 version: 0.0.19(@somebuild/build-component-vue2@0.0.6) + vue: + specifier: 2.6.14 + version: 2.6.14 + vue-template-compiler: + specifier: 2.6.14 + version: 2.6.14 packages: diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..2ae0d8c --- /dev/null +++ b/readme.md @@ -0,0 +1 @@ +https://github.com/wheatjs/vaguer \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 82d8590..1ea3f13 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,5 @@ export const VaguerComponents: PluginObject<{}> = { }); }, }; -console.log(22); -// START_EXPORTS export { default as VaguerButton } from "./components/VaguerButton"; -// END_EXPORTS