Skip to content

Commit

Permalink
Merge pull request #188 from cloudinary/chore/rename-vue-package
Browse files Browse the repository at this point in the history
 Rename @cloudinary/vue3 to @cloudinary/vue
  • Loading branch information
mckomo-cl authored Dec 12, 2022
2 parents 6e6272a + 66652c8 commit efb5095
Show file tree
Hide file tree
Showing 31 changed files with 147 additions and 136 deletions.
8 changes: 4 additions & 4 deletions e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"prepare:react": "npm run pack:react-sdk && npm run cpy-react-sdk && npm run build:react-test-app && npm run serve:react-test-app",
"setChromeDriverVersion": "./scripts/setChromeDriverVersion.sh",
"start-server-and-test:react": "WAIT_ON_TIMEOUT=600000 start-server-and-test prepare:react http://127.0.0.1:8000 test",
"pack:vue-sdk": "cd ../frameworks/vue/vue3 && npm run build && npm pack",
"cpy-vue-sdk": "cpy ../frameworks/vue/vue3/cloudinary-vue-*.tgz ./vue3-test-app --rename=cloudinary-vue.tgz",
"build:vue-test-app": "cd vue3-test-app && npm run clean-install && npm run build",
"serve:vue-test-app": "ws --directory vue3-test-app/dist",
"pack:vue-sdk": "cd ../frameworks/vue && npm run build && npm pack",
"cpy-vue-sdk": "cpy ../frameworks/vue/cloudinary-vue-*.tgz ./vue-test-app --rename=cloudinary-vue.tgz",
"build:vue-test-app": "cd vue-test-app && npm run clean-install && npm run build",
"serve:vue-test-app": "ws --directory vue-test-app/dist",
"prepare:vue": "npm run pack:vue-sdk && npm run cpy-vue-sdk && npm run build:vue-test-app && npm run serve:vue-test-app",
"start-server-and-test:vue": "WAIT_ON_TIMEOUT=600000 start-server-and-test prepare:vue http://127.0.0.1:8000 test"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "lerna run test",
"build:docs": "node ./scripts/buildDocs.js",
"start:docs": "live-server --open=public/docs",
"update:urlgen": "npm install @cloudinary/url-gen@latest --prefix packages/html && npm install @cloudinary/url-gen@latest --prefix packages/react && npm install @cloudinary/url-gen@latest --prefix packages/vue3 && npm install @cloudinary/url-gen@latest --prefix packages/angular && npm install @cloudinary/url-gen@latest --prefix packages/angular/projects/cloudinary-library"
"update:urlgen": "npm install @cloudinary/url-gen@latest --prefix packages/html && npm install @cloudinary/url-gen@latest --prefix packages/react && npm install @cloudinary/url-gen@latest --prefix packages/vue && npm install @cloudinary/url-gen@latest --prefix packages/angular && npm install @cloudinary/url-gen@latest --prefix packages/angular/projects/cloudinary-library"
},
"dependencies": {
"better-docs": "2.3.2",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
125 changes: 125 additions & 0 deletions packages/vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
Cloudinary Vue SDK
=========================
## About
The Cloudinary Vue SDK allows you to quickly and easily integrate your application with Cloudinary.
Effortlessly optimize and transform your cloud's assets.

#### Note
This Readme provides basic installation and usage information.

## Table of Contents
- [Cloudinary Vue 3 SDK](#cloudinary-vue-3-sdk)
- [About](#about)
- [Note](#note)
- [Table of Contents](#table-of-contents)
- [Key Features](#key-features)
- [Version Support](#version-support)
- [Installation](#installation)
- [Install using your favorite package manager (yarn, npm)](#install-using-your-favorite-package-manager-yarn-npm)
- [Usage Example](#usage-example)
- [Setup](#setup)
- [Generate Image elements](#generate-image-elements)
- [Advanced Plugin Features](#advanced-plugin-features)
- [File upload](#file-upload)
- [Contributions](#contributions)
- [Get Help](#get-help)
- [About Cloudinary](#about-cloudinary)
- [Additional Resources](#additional-resources)
- [License](#license)

## Key Features
- [Transform](https://cloudinary.com/documentation/react_video_manipulation#video_transformation_examples) and
[optimize](https://cloudinary.com/documentation/react_image_manipulation#image_optimizations) assets.
- Generate [image](https://cloudinary.com/documentation/react_image_manipulation#deliver_and_transform_images) and
[video](https://cloudinary.com/documentation/react_video_manipulation#video_element) tags.

## Version Support
| SDK Version | Vue 3.x |
|---------------|---------|
| 1.0.0 & up | V |

## Installation
### Install using your favorite package manager (yarn, npm)
```bash
npm i @cloudinary/url-gen @cloudinary/vue

```
Or
```bash
yarn add @cloudinary/url-gen @cloudinary/vue
```

## Usage Example
### Setup
```vue
<script type="module">
import { AdvancedImage, responsive } from "@cloudinary/vue"
import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage";
export default {
components: {
AdvancedImage
},
data() {
return {
plugins: [responsive({steps: 100})],
cldImg: new CloudinaryImage(
"sample",
{cloudName: "demo"}
)
};
}
};
</script>
<template>
<div>
<p>text</p>
<AdvancedImage :cldImg="cldImg" :plugins="plugins" />
</div>
</template>
```

### Generate Image elements
- Use <AdvancedImage> to generate image tags

### Advanced Plugin Features
- [See full documentation](https://cloudinary.com/documentation/react_integration#plugins)

We recommend the following order when using our plugins to achieve the best results:
```js
[lazyload(), responsive(), accessibility(), placeholder()]
```

You can omit any plugin, but the order from above should remain.

### File upload
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).

## Contributions
- Ensure tests run locally (```npm run test```)
- Open a PR and ensure Travis tests pass

## Get Help
If you run into an issue or have a question, you can either:
- [Open a Github issue](https://github.com/cloudinary/frontend-frameworks/issues) (for issues related to the SDK)
- [Open a support ticket](https://cloudinary.com/contact) (for issues related to your account)

## About Cloudinary
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.


## Additional Resources
- [Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs.
- [MediaJams.dev](https://mediajams.dev/): Bite-size use-case tutorials written by and for Cloudinary Developers
- [DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube.
- [Cloudinary Academy](https://training.cloudinary.com/): Free self-paced courses, instructor-led virtual courses, and on-site courses.
- [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.
- [Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next.
- [Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers.
- [Cloudinary Account Registration](https://cloudinary.com/users/register/free): Free Cloudinary account registration.
- [Cloudinary Website](https://cloudinary.com): Learn about Cloudinary's products, partners, customers, pricing, and more.


## License
Released under the MIT license.
File renamed without changes.
13 changes: 10 additions & 3 deletions packages/vue3/package.json → packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"name": "@cloudinary/vue3",
"name": "@cloudinary/vue",
"version": "1.6.0",
"description": "Cloudinary Vue3 SDK",
"description": "Cloudinary Vue SDK",
"author": "cloudinary",
"license": "MIT",
"type": "module",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/cloudinary/frontend-frameworks.git",
"directory": "packages/vue"
},
"scripts": {
"build": "rollup -c",
"prebuild": "rm -rf dist && npm run build --prefix ../html",
Expand All @@ -16,7 +23,7 @@
"test": "npm run test:dist && npm run test:src",
"test:src": "vue-cli-service test:unit --coverage",
"pretest:src": "replace-in-files --string='../../dist' --replacement='../../src' tests/unit/*.spec.ts",
"test:dist": "npm run build && VUE3_TEST_ENV=DIST vue-cli-service test:unit",
"test:dist": "npm run build && VUE_TEST_ENV_TEST_ENV=DIST vue-cli-service test:unit",
"pretest:dist": "replace-in-files --string='../../src\"' --replacement='../../dist\"' tests/unit/*.spec.ts",
"serve:coverage": "http-server coverage/lcov-report",
"lint": "vue-cli-service lint"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default [
output: {
format: "umd",
file: "dist/index.umd.js",
name: "CloudinaryVue3SDK",
name: "CloudinaryVueSDK",
globals: {
"@cloudinary/html": "CloudinaryHtml",
vue: "Vue",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<script setup lang="ts">
/**
* @memberOf Vue3SDK
* @memberOf CloudinaryVueSDK
* @type {Component}
* @description The Cloudinary image component.
* @prop {CloudinaryImage} cldImg Generated by @cloudinary/url-gen
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const cloudinaryImage = new CloudinaryImage("sample", { cloudName: "demo" });

describe("analytics", () => {
testIf(
!(process.env.VUE3_TEST_ENV === "DIST"),
!(process.env.VUE_TEST_ENV === "DIST"),
"creates an img with analytics using src",
async () => {
// Update src analytics value
Expand All @@ -27,7 +27,7 @@ describe("analytics", () => {
);

testIf(
process.env.VUE3_TEST_ENV === "DIST",
process.env.VUE_TEST_ENV === "DIST",
"creates an img with analytics using dist",
async () => {
const component = mount(AdvancedImage, {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
125 changes: 2 additions & 123 deletions packages/vue3/README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,4 @@
Cloudinary Vue 3 SDK
Cloudinary Vue SDK
=========================
## About
The Cloudinary Vue 3 SDK allows you to quickly and easily integrate your application with Cloudinary.
Effortlessly optimize and transform your cloud's assets.

#### Note
This Readme provides basic installation and usage information.

## Table of Contents
- [Cloudinary Vue 3 SDK](#cloudinary-vue-3-sdk)
- [About](#about)
- [Note](#note)
- [Table of Contents](#table-of-contents)
- [Key Features](#key-features)
- [Version Support](#version-support)
- [Installation](#installation)
- [Install using your favorite package manager (yarn, npm)](#install-using-your-favorite-package-manager-yarn-npm)
- [Usage Example](#usage-example)
- [Setup](#setup)
- [Generate Image elements](#generate-image-elements)
- [Advanced Plugin Features](#advanced-plugin-features)
- [File upload](#file-upload)
- [Contributions](#contributions)
- [Get Help](#get-help)
- [About Cloudinary](#about-cloudinary)
- [Additional Resources](#additional-resources)
- [License](#license)

## Key Features
- [Transform](https://cloudinary.com/documentation/react_video_manipulation#video_transformation_examples) and
[optimize](https://cloudinary.com/documentation/react_image_manipulation#image_optimizations) assets.
- Generate [image](https://cloudinary.com/documentation/react_image_manipulation#deliver_and_transform_images) and
[video](https://cloudinary.com/documentation/react_video_manipulation#video_element) tags.

## Version Support
| SDK Version | Vue 3.x |
|---------------|---------|
| 1.0.0 & up | V |

## Installation
### Install using your favorite package manager (yarn, npm)
```bash
npm i @cloudinary/url-gen @cloudinary/vue3

```
Or
```bash
yarn add @cloudinary/url-gen @cloudinary/vue3
```

## Usage Example
### Setup
```vue
<script type="module">
import { AdvancedImage, responsive } from "@cloudinary/vue3"
import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage";
export default {
components: {
AdvancedImage
},
data() {
return {
plugins: [responsive({steps: 100})],
cldImg: new CloudinaryImage(
"sample",
{cloudName: "demo"}
)
};
}
};
</script>
<template>
<div>
<p>text</p>
<AdvancedImage :cldImg="cldImg" :plugins="plugins" />
</div>
</template>
```

### Generate Image elements
- Use <AdvancedImage> to generate image tags

### Advanced Plugin Features
- [See full documentation](https://cloudinary.com/documentation/react_integration#plugins)

We recommend the following order when using our plugins to achieve the best results:
```js
[lazyload(),responsive(), accessibility(), placeholder()]
```

You can omit any plugin, but the order from above should remain.

### File upload
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).

## Contributions
- Ensure tests run locally (```npm run test```)
- Open a PR and ensure Travis tests pass

## Get Help
If you run into an issue or have a question, you can either:
- [Open a Github issue](https://github.com/cloudinary/frontend-frameworks/issues) (for issues related to the SDK)
- [Open a support ticket](https://cloudinary.com/contact) (for issues related to your account)

## About Cloudinary
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.


## Additional Resources
- [Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs.
- [MediaJams.dev](https://mediajams.dev/): Bite-size use-case tutorials written by and for Cloudinary Developers
- [DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube.
- [Cloudinary Academy](https://training.cloudinary.com/): Free self-paced courses, instructor-led virtual courses, and on-site courses.
- [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.
- [Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next.
- [Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers.
- [Cloudinary Account Registration](https://cloudinary.com/users/register/free): Free Cloudinary account registration.
- [Cloudinary Website](https://cloudinary.com): Learn about Cloudinary's products, partners, customers, pricing, and more.


## License
Released under the MIT license.
**[DEPRECATED]** Package `@cloudinary/vue3` was renamed to `@cloudinary/vue`. Source code was moved to [packages/vue](https://github.com/cloudinary/frontend-frameworks/tree/master/packages/vue) directory.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@cloudinary/html": ["html/src"],
"@cloudinary/ng": ["angular/projects/cloudinary-library/src"],
"@cloudinary/react": ["react/src"],
"@cloudinary/vue3": ["vue3/src"],
"@cloudinary/vue": ["vue/src"],
"@cloudinary/*": ["*/src"],
"*": ["node_modules"]
},
Expand Down

0 comments on commit efb5095

Please sign in to comment.