Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
johndatserakis committed Mar 20, 2022
1 parent 68a8fc2 commit 1f13bc4
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CHANGELOG.md

## 4.0.0
## 4.0.1

- Upgrade package to support Vue 3. Vue 2 support can be found at `v3.4.2`. Thank you @danielelkington.

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Simple context-menu component built for Vue. Works well with both left and right
<img src="https://img.shields.io/twitter/url/https/github.com/johndatserakis/vue-simple-context-menu.svg?style=social" alt="Tweet"></a>
</p>

[View Demo](https://johndatserakis.github.io/vue-simple-context-menu/) | [GitHub](https://github.com/johndatserakis/vue-simple-context-menu) | [npm](https://www.npmjs.com/package/vue-simple-context-menu)
- [Demo](https://johndatserakis.github.io/vue-simple-context-menu/)
- [GitHub](https://github.com/johndatserakis/vue-simple-context-menu)
- [npm](https://www.npmjs.com/package/vue-simple-context-menu)
- [StackBlitz](https://stackblitz.com/edit/vue-chj3sg?file=src/App.vue)

## Vue 3 Support

Expand Down Expand Up @@ -40,19 +43,16 @@ Just a simple little menu to be shown where a click happens - closes after use a

A nice feature that comes baked in is the menu placement after a click - it sits just ever so slightly under your click location - so that any hover style you had on the item that was clicked gets removed nicely. I modeled it after the macOS right click menu.

## Usage Example

```css
/* CSS import for when you want to import the component CSS into your CSS file/files */
@import '/path/to/node_modules/vue-simple-context-menu.css';
```
## Usage

```js
// CSS import for when you're importing the CSS directly in your JS
import 'vue-simple-context-menu/dist/vue-simple-context-menu.css';
import { createApp } from 'vue';
import VueSimpleContextMenu from 'vue-simple-context-menu';
import 'vue-simple-context-menu/dist/vue-simple-context-menu.css';

const app = createApp(App);

Vue.component('vue-simple-context-menu', VueSimpleContextMenu);
app.component('vue-simple-context-menu', VueSimpleContextMenu);
```

```html
Expand Down Expand Up @@ -142,7 +142,7 @@ Note - make sure to use `@click.prevent.stop` (or `@contextmenu.prevent.stop` fo
yarn

# Serve with hot reload
yarn watch
yarn dev

# Run the tests
yarn test
Expand Down
2 changes: 0 additions & 2 deletions dist/vue-simple-context-menu.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,13 @@ script.__file = "src/vue-simple-context-menu.vue";

// Import vue component

// Install function executed by app.use()
function install(app) {
if (install.installed) { return; }

install.installed = true;
app.component('VueSimpleContextMenu', script);
}

// Create module definition for Vue.use()
var plugin = { install: install };

// To auto-install when Vue is found
Expand Down
2 changes: 0 additions & 2 deletions dist/vue-simple-context-menu.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,13 @@

// Import vue component

// Install function executed by app.use()
function install(app) {
if (install.installed) { return; }

install.installed = true;
app.component('VueSimpleContextMenu', script);
}

// Create module definition for Vue.use()
var plugin = { install: install };

// To auto-install when Vue is found
Expand Down
2 changes: 1 addition & 1 deletion docs/build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous"
/>
<link href="/vue-simple-context-menu/main.css" rel="stylesheet"></head>
</head>

<body>
<div id="app"></div>
Expand Down
5 changes: 0 additions & 5 deletions docs/main.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/main.css.map

This file was deleted.

3 changes: 1 addition & 2 deletions example/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { createApp } from 'vue';
import App from './App.vue';
import VueSimpleContextMenu from '../src/index.js';

const app = createApp(App);

import VueSimpleContextMenu from '../src/index.js';

app.component('vue-simple-context-menu', VueSimpleContextMenu);

app.mount('#app');
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@
"build:umd": "rollup --config rollup.config.js --format umd --file dist/vue-simple-context-menu.umd.js",
"build:unpkg": "rollup --config rollup.config.js --format iife --file dist/vue-simple-context-menu.min.js",
"test": "jest",
"watch": "cross-env NODE_ENV=development webpack-dev-server --open --hot"
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot"
},
"sideEffects": false,
"unpkg": "dist/vue-simple-context-menu.min.js",
"version": "4.0.0"
"version": "4.0.1"
}

0 comments on commit 1f13bc4

Please sign in to comment.