Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vue3-migration): Migrates to vue 3 #352

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to `vue-draggable-resizable` will be documented in this file

## 3.0.0 - ?
- Migrates to vue 3
- Updates all packages
- Adds vitest instead of mocha and karma for testing
- Adds vite instead of raw webpack
- And minor changes

## 2.3.0 - 2020-12-17
- `scale` prop supports one or two values
- component with `active` prop to `true` emits `activated`
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<p align="center"><img src="https://rawgit.com/mauricius/vue-draggable-resizable/v1/docs/resources/logo.png" alt="logo"></p>
<h1 align="center">VueDraggableResizable 2</h1>
<h1 align="center">VueDraggableResizable 3</h1>

[![Latest Version on NPM](https://img.shields.io/npm/v/vue-draggable-resizable.svg?style=flat-square)](https://npmjs.com/package/vue-draggable-resizable)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![npm](https://img.shields.io/npm/dt/vue-draggable-resizable.svg?style=flat-square)](https://www.npmjs.com/package/vue-draggable-resizable)

> Vue2 Component for draggable and resizable elements.
> Vue Component for draggable and resizable elements.

If you are looking for the version 1 of the component, it is available on the [v1 branch](https://github.com/mauricius/vue-draggable-resizable/tree/v1).

Expand Down Expand Up @@ -53,16 +53,18 @@ $ npm install --save vue-draggable-resizable
```


Register the component
Register the component globally

```js
import Vue from 'vue'
// main.js
import createApp from 'vue'
import VueDraggableResizable from 'vue-draggable-resizable'

// optionally import default styles
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
import App from '/src/App.vue'

Vue.component('vue-draggable-resizable', VueDraggableResizable)
const app = createApp(App)
app.component('vue-draggable-resizable', VueDraggableResizable)
```

You may now use the component in your markup
Expand All @@ -81,6 +83,9 @@ You may now use the component in your markup
import VueDraggableResizable from 'vue-draggable-resizable'

export default {
components: {
'vue-draggable-resizable': VueDraggableResizable
},
data: function () {
return {
width: 0,
Expand Down
8 changes: 0 additions & 8 deletions babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>vue-draggable-resizable</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>