From 0ca066f33dbafa1c411bf93277c0ca8fb64f34b6 Mon Sep 17 00:00:00 2001 From: dendrofen Date: Mon, 18 Sep 2023 10:19:24 +0300 Subject: [PATCH] refactor: library files to external folder --- .npmignore | 3 --- package.json | 6 +++++- {src/lib => react-konva-to-svg}/index.js | 0 src/components/ProcessButtons.js | 2 +- yarn.lock | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .npmignore rename {src/lib => react-konva-to-svg}/index.js (100%) diff --git a/.npmignore b/.npmignore deleted file mode 100644 index ce50cb6..0000000 --- a/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -* -# npmignore -!src/lib/**/* diff --git a/package.json b/package.json index faa447e..e406c45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-konva-to-svg", - "version": "1.0.1", + "version": "1.0.2", "private": false, "keywords": [ "react-konva", @@ -17,6 +17,10 @@ "description": "Extend Konva's functionality to export stages as SVG. Enhance the quality of exported images with SVG format.", "author": "dendrofen", "license": "MIT", + "main": "react-konva-to-svg/index.js", + "files": [ + "react-konva-to-svg" + ], "repository": { "type": "git", "url": "git+https://github.com/dendrofen/react-konva-to-svg.git" diff --git a/src/lib/index.js b/react-konva-to-svg/index.js similarity index 100% rename from src/lib/index.js rename to react-konva-to-svg/index.js diff --git a/src/components/ProcessButtons.js b/src/components/ProcessButtons.js index 14fe394..c8ff84a 100644 --- a/src/components/ProcessButtons.js +++ b/src/components/ProcessButtons.js @@ -1,6 +1,6 @@ import styles from '@/app/page.module.css'; -import { exportStageSVG } from "@/lib"; import { startTransition, useCallback, useState } from "react"; +import { exportStageSVG } from '../../react-konva-to-svg'; export default function ProcessButtons() { const [image, setImage] = useState(); diff --git a/yarn.lock b/yarn.lock index d3d6648..59c0f1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1815,7 +1815,7 @@ react-reconciler@~0.29.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react@18.2.0: +react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==