Skip to content

Commit

Permalink
feat: change vanilla-jsoneditor from peerDependency to dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
cloydlau committed Oct 8, 2023
1 parent bff6f1b commit 84b672c
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 298 deletions.
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,10 @@

## Install

### Peer Dependencies

- vue
- vanilla-jsoneditor: Standalone bundle provided by [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor) (successor to [jsoneditor](https://github.com/josdejong/jsoneditor))
- ~~@vue/composition-api~~: Only for Vue 2.6 or earlier

<br>

### Vue 3

```shell
npm i json-editor-vue vanilla-jsoneditor
npm i json-editor-vue
```

#### Local Registration
Expand Down Expand Up @@ -171,7 +163,7 @@ createApp()
### Vue 2.7

```shell
npm i json-editor-vue vanilla-jsoneditor
npm i json-editor-vue
```

#### Local Registration
Expand Down Expand Up @@ -286,7 +278,7 @@ Vue.use(JsonEditorVue, {
### Vue 2.6 or Earlier

```shell
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
npm i json-editor-vue @vue/composition-api
```

#### Local Registration
Expand Down Expand Up @@ -423,7 +415,7 @@ Vue.use(JsonEditorVue, {
### Nuxt 3

```shell
npm i json-editor-vue vanilla-jsoneditor
npm i json-editor-vue
```

#### Local Registration
Expand Down Expand Up @@ -510,7 +502,7 @@ const value = ref()
### Nuxt 2 + Vue 2.7

```shell
npm i json-editor-vue vanilla-jsoneditor
npm i json-editor-vue
```

#### Local Registration
Expand Down Expand Up @@ -611,7 +603,7 @@ const value = ref()
### Nuxt 2 + Vue 2.6 or Earlier

```shell
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
npm i json-editor-vue @vue/composition-api
```

#### Local Registration
Expand Down Expand Up @@ -849,6 +841,20 @@ module.exports = {

<br>

### Override dependency versions

```json
// package.json
{
"overrides": {
"vanilla-jsoneditor": "x.x.x",
"vue-demi": "x.x.x"
}
}
```

<br>

## Props

| Name | Description | Type | Default |
Expand Down
2 changes: 1 addition & 1 deletion docs/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
- Vue 2.6/2.7/3 一体通用
- 支持 SSR (Nuxt 2/3 一体通用)
- 支持 Vite,Vue CLI,webpack,CDN...
- 支持微前端 ([wujie](https://github.com/Tencent/wujie)[qiankun](https://github.com/umijs/qiankun)[single-spa](https://github.com/single-spa/single-spa)……)
- 支持微前端 ([wujie](https://github.com/Tencent/wujie)[qiankun](https://github.com/umijs/qiankun)[single-spa](https://github.com/single-spa/single-spa)...)
- 局部注册并传参,或全局注册并传参 ([vue-global-config](https://github.com/cloydlau/vue-global-config) 提供技术支持)

<br>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"docs",
"nuxt.ts"
],
"engines": { "npm": ">=8.3.0" },
"scripts": {
"dev": "esno ./scripts/dev.mts",
"doc": "vitepress dev --open /README",
Expand All @@ -60,7 +61,6 @@
},
"peerDependencies": {
"@vue/composition-api": ">=1",
"vanilla-jsoneditor": ">=0",
"vue": "2||3"
},
"peerDependenciesMeta": {
Expand All @@ -69,7 +69,8 @@
}
},
"dependencies": {
"vue-demi": "latest"
"vanilla-jsoneditor": "^0.18.8",
"vue-demi": "^0.14.6"
},
"devDependencies": {
"@antfu/eslint-config": "~0.42.1",
Expand Down Expand Up @@ -105,7 +106,6 @@
"typescript": "latest",
"unplugin-auto-import": "latest",
"unplugin-vue-components": "latest",
"vanilla-jsoneditor": "latest",
"vite": "latest",
"vite-plugin-dts": "latest",
"vitepress": "latest",
Expand Down
Loading

0 comments on commit 84b672c

Please sign in to comment.