From a2820b66df9c7417dbb6cc3cf02d58ba33797b09 Mon Sep 17 00:00:00 2001 From: avil13 <13.avil@gmail.com> Date: Sun, 25 Oct 2020 21:19:10 +0300 Subject: [PATCH] feat: Prevent auto import of sweetalert style closes #116 --- packages/vue-sweetalert2/package.json | 28 ++++++--------------------- packages/vue-sweetalert2/src/index.ts | 4 ++-- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/packages/vue-sweetalert2/package.json b/packages/vue-sweetalert2/package.json index bde97ff..dbf3e86 100644 --- a/packages/vue-sweetalert2/package.json +++ b/packages/vue-sweetalert2/package.json @@ -1,14 +1,10 @@ { "name": "vue-sweetalert2", - "version": "4.0.1", + "version": "4.1.0", "description": "Simple Vue sweetalert2 package", "main": "dist/index.js", "types": "dist/index.d.ts", - "files": [ - "src", - "nuxt", - "dist" - ], + "files": ["src", "nuxt", "dist"], "scripts": { "build": "tsc -p .", "test": "jest --no-cache", @@ -20,13 +16,7 @@ "lint:ts": "tsc --noEmit --skipLibCheck", "lint": "npm run lint:prettier && npm run lint:ts" }, - "keywords": [ - "sweetalert", - "sweetalert2", - "alert", - "prompt", - "ssr" - ], + "keywords": ["sweetalert", "sweetalert2", "alert", "prompt", "ssr"], "author": "Aleksey Pivkin @avil13", "license": "MIT", "dependencies": { @@ -67,19 +57,13 @@ "vue-template-compiler": "^2.6.12" }, "nodemonConfig": { - "watch": [ - "src" - ], + "watch": ["src"], "exec": "npm run prepublish", "delay": 2500 }, "lint-staged": { - "*.{js,html,vue,md,json}": [ - "npm run lint:prettier" - ], - "*.{ts}": [ - "npm run lint:prettier && npm run lint:ts" - ] + "*.{js,html,vue,md,json}": ["npm run lint:prettier"], + "*.{ts}": ["npm run lint:prettier && npm run lint:ts"] }, "husky": { "hooks": { diff --git a/packages/vue-sweetalert2/src/index.ts b/packages/vue-sweetalert2/src/index.ts index 95cb62d..1320f73 100644 --- a/packages/vue-sweetalert2/src/index.ts +++ b/packages/vue-sweetalert2/src/index.ts @@ -1,7 +1,7 @@ +import { SweetAlertOptions } from 'sweetalert2'; +import Swal from 'sweetalert2/dist/sweetalert2.js'; import Vue from 'vue'; -import Swal, {SweetAlertOptions} from 'sweetalert2'; - export * from 'sweetalert2'; type TVueSwalInstance = typeof Swal & typeof Swal.fire;