|
1 | | -# vue3 |
| 1 | +Cloudinary Vue 3 SDK |
| 2 | +========================= |
| 3 | +## About |
| 4 | +The Cloudinary Vue 3 SDK allows you to quickly and easily integrate your application with Cloudinary. |
| 5 | +Effortlessly optimize and transform your cloud's assets. |
2 | 6 |
|
3 | | -## Project setup |
4 | | -``` |
5 | | -npm install |
6 | | -``` |
| 7 | +#### Note |
| 8 | +This Readme provides basic installation and usage information. |
7 | 9 |
|
8 | | -### Compiles and hot-reloads for development |
9 | | -``` |
10 | | -npm run serve |
11 | | -``` |
| 10 | +## Table of Contents |
| 11 | +- [Key Features](#key-features) |
| 12 | +- [Version Support](#Version-Support) |
| 13 | +- [Installation](#installation) |
| 14 | +- [Usage](#usage) |
| 15 | + - [Setup](#Setup) |
| 16 | + - [Transform and Optimize Assets](#Transform-and-Optimize-Assets) |
| 17 | + - [Generate Image and HTML Tags](#Generate-Image-and-Video-HTML-Tags) |
| 18 | + - [Plugins](#Advanced-Plugin-Features) |
12 | 19 |
|
13 | | -### Compiles and minifies for production |
14 | | -``` |
15 | | -npm run build |
16 | | -``` |
| 20 | +## Key Features |
| 21 | +- [Transform](https://cloudinary.com/documentation/react_video_manipulation#video_transformation_examples) and |
| 22 | + [optimize](https://cloudinary.com/documentation/react_image_manipulation#image_optimizations) assets. |
| 23 | +- Generate [image](https://cloudinary.com/documentation/react_image_manipulation#deliver_and_transform_images) and |
| 24 | + [video](https://cloudinary.com/documentation/react_video_manipulation#video_element) tags. |
| 25 | + |
| 26 | +## Version Support |
| 27 | +| SDK Version | Vue 3.x | |
| 28 | +|---------------|---------| |
| 29 | +| 1.0.0 & up | V | |
| 30 | + |
| 31 | +## Installation |
| 32 | +### Install using your favorite package manager (yarn, npm) |
| 33 | +```bash |
| 34 | +npm i @cloudinary/url-gen @cloudinary/vue3 |
17 | 35 |
|
18 | | -### Run your unit tests |
19 | 36 | ``` |
20 | | -npm run test:unit |
| 37 | +Or |
| 38 | +```bash |
| 39 | +yarn add @cloudinary/url-gen @cloudinary/vue3 |
21 | 40 | ``` |
22 | 41 |
|
23 | | -### Lints and fixes files |
24 | | -``` |
25 | | -npm run lint |
| 42 | +## Usage Example |
| 43 | +### Setup |
| 44 | +```vue |
| 45 | +<script type="module"> |
| 46 | +import { AdvancedImage, responsive } from "@cloudinary/vue3" |
| 47 | +import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; |
| 48 | +
|
| 49 | +export default { |
| 50 | + components: { |
| 51 | + AdvancedImage |
| 52 | + }, |
| 53 | + data() { |
| 54 | + return { |
| 55 | + plugins: [responsive({steps: 100})], |
| 56 | + cldImg: new CloudinaryImage( |
| 57 | + "sample", |
| 58 | + {cloudName: "demo"} |
| 59 | + ) |
| 60 | + }; |
| 61 | + } |
| 62 | +}; |
| 63 | +</script> |
| 64 | +
|
| 65 | +<template> |
| 66 | + <div> |
| 67 | + <p>text</p> |
| 68 | + <AdvancedImage :cldImg="cldImg" :plugins="plugins" /> |
| 69 | + </div> |
| 70 | +</template>``` |
| 71 | +
|
| 72 | +### Generate Image elements |
| 73 | + - Use <AdvancedImage> to generate image tags |
| 74 | +
|
| 75 | +### Advanced Plugin Features |
| 76 | +- [See full documentation](https://cloudinary.com/documentation/react_integration#plugins) |
| 77 | +
|
| 78 | +We recommend the following order when using our plugins to achieve the best results: |
| 79 | +```js |
| 80 | +[lazyload(),responsive(), accessibility(), placeholder()] |
26 | 81 | ``` |
27 | 82 |
|
28 | | -### Customize configuration |
29 | | -See [Configuration Reference](https://cli.vuejs.org/config/). |
| 83 | +You can omit any plugin, but the order from above should remain. |
| 84 | + |
| 85 | +### File upload |
| 86 | +This SDK does not provide file upload functionality, however there are [several methods of uploading from the client side](https://cloudinary.com/documentation/vue_image_and_video_upload). |
| 87 | + |
| 88 | +## Contributions |
| 89 | +- Ensure tests run locally (```npm run test```) |
| 90 | +- Open a PR and ensure Travis tests pass |
| 91 | + |
| 92 | +## Get Help |
| 93 | +If you run into an issue or have a question, you can either: |
| 94 | +- [Open a Github issue](https://github.com/cloudinary/frontend-frameworks/issues) (for issues related to the SDK) |
| 95 | +- [Open a support ticket](https://cloudinary.com/contact) (for issues related to your account) |
| 96 | + |
| 97 | +## About Cloudinary |
| 98 | +Cloudinary is a powerful media API for websites and mobile apps alike, Cloudinary enables developers to efficiently manage, transform, optimize, and deliver images and videos through multiple CDNs. Ultimately, viewers enjoy responsive and personalized visual-media experiences—irrespective of the viewing device. |
| 99 | + |
| 100 | + |
| 101 | +## Additional Resources |
| 102 | +- [Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs. |
| 103 | +- [MediaJams.dev](https://mediajams.dev/): Bite-size use-case tutorials written by and for Cloudinary Developers |
| 104 | +- [DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube. |
| 105 | +- [Cloudinary Academy](https://training.cloudinary.com/): Free self-paced courses, instructor-led virtual courses, and on-site courses. |
| 106 | +- [Code Explorers and Feature Demos](https://cloudinary.com/documentation/code_explorers_demos_index): A one-stop shop for all code explorers, Postman collections, and feature demos found in the docs. |
| 107 | +- [Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next. |
| 108 | +- [Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers. |
| 109 | +- [Cloudinary Account Registration](https://cloudinary.com/users/register/free): Free Cloudinary account registration. |
| 110 | +- [Cloudinary Website](https://cloudinary.com): Learn about Cloudinary's products, partners, customers, pricing, and more. |
| 111 | + |
| 112 | + |
| 113 | +## Licence |
| 114 | +Released under the MIT license. |
0 commit comments