diff --git a/.babelrc b/.babelrc deleted file mode 100644 index e5f6f49..0000000 --- a/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["@babel/preset-env", "@babel/preset-typescript"], - "plugins": [["@babel/plugin-transform-runtime"]] -} diff --git a/.nvmrc b/.nvmrc index 5595ae1..2a4e4ab 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.17.6 +16.17.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 26faa96..0a00318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG.md +## 6.0.0 + +- Use vite for serving app and building library +- Remove rollup +- Remove babel +- Update package.json exports + ## 5.0.8 - Fix index bug. Thank you @tasinttttttt. diff --git a/README.md b/README.md index fe89d87..6703f8f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Or, you can include it through the browser. @@ -43,11 +43,11 @@ Or, you can include it through the browser. This is a simple frontend utility meant to help the file-upload process on your website. -It is written in pure JavaScript and has no dependencies. You can check out the live demo [here](https://johndatserakis.github.io/file-upload-with-preview). +It is written in pure JavaScript using TypeScript and has no dependencies. You can check out the live demo [here](https://johndatserakis.github.io/file-upload-with-preview). For the most part, browsers do a good job of handling image-uploads. That being said - I find the ability to show our users a preview of their upload can go a long way in increasing the confidence in their upload. -file-upload-with-preview aims to address the issue of showing a preview of a user's uploaded image in a simple to use package. +`file-upload-with-preview` aims to address the issue of showing a preview of a user's uploaded image in a simple to use package. ## Features @@ -63,16 +63,16 @@ file-upload-with-preview aims to address the issue of showing a preview of a use This library looks for a specific HTML element to display the file-upload. Simply add the below `div` to your HTML. Make sure to populate your unique id in the `data-upload-id` attribute. ```html -
+ ``` Then, initialize your file-upload in the JavaScript like below: ```javascript import { FileUploadWithPreview } from 'file-upload-with-preview'; -import 'file-upload-with-preview/dist/file-upload-with-preview.min.css'; +import 'file-upload-with-preview/dist/style.css'; -const upload = new FileUploadWithPreview('myFirstImage'); +const upload = new FileUploadWithPreview('my-unique-id'); ``` If you're importing directly in the browser, use the following instead: @@ -85,11 +85,11 @@ If you're importing directly in the browser, use the following instead: - +