Skip to content

Commit

Permalink
refactor(editor): remove emqx editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Apr 10, 2021
1 parent 45d4c3b commit 71801b0
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 283 deletions.
8 changes: 0 additions & 8 deletions example/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@
<div class="show-item">
<emqx-tags v-model="tagResult" allow-add :options="tagOptions" :request-to-add="fakeRequestToAddTag"></emqx-tags>
</div>
<h2>Editor</h2>
<div class="show-item">
<emqx-editor id="test" v-model="jsonValue" :lang="editorLang" :height="editorHeight"></emqx-editor>
</div>
</template>

<script lang="ts">
Expand Down Expand Up @@ -218,8 +214,6 @@ export default defineComponent({
const testTagsOptions = ['test1', 'test2', 'test3']
const kvTest = ref({})
const jsonValue = ref(JSON.stringify({ messge: 'hello' }, null, 2))
const editorHeight = ref(200)
const editorLang = ref('json')
const test = () => {
console.log(testInput.value)
console.log(testSelect.value)
Expand Down Expand Up @@ -279,8 +273,6 @@ export default defineComponent({
tagOptions,
fakeRequestToAddTag,
jsonValue,
editorHeight,
editorLang,
}
},
})
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
},
"dependencies": {
"core-js": "^3.6.5",
"element-plus": "^1.0.2-beta.35",
"monaco-editor": "^0.23.0"
"element-plus": "^1.0.2-beta.35"
},
"peerDependencies": {
"vue": "^3.0.0"
Expand All @@ -49,7 +48,6 @@
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^7.0.0-0",
"lint-staged": "^9.5.0",
"monaco-editor-webpack-plugin": "^3.0.1",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.2",
Expand Down
71 changes: 0 additions & 71 deletions packages/Editor/composables/useEditor.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/Editor/index.ts

This file was deleted.

75 changes: 0 additions & 75 deletions packages/Editor/src/editor.vue

This file was deleted.

21 changes: 0 additions & 21 deletions packages/Editor/types/editor.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import BreadcrumbItem from './BreadcrumbItem'
import Upload from './Upload'
import Tags from './Tags'
import KeyValueEditor from './KeyValueEditor'
import Editor from './Editor'
import Loading from './Loading'

import lang from 'element-plus/lib/locale/lang/zh-cn'
Expand Down Expand Up @@ -68,7 +67,6 @@ const components = [
Upload,
Tags,
KeyValueEditor,
Editor,
]

const plugins = [Loading]
Expand Down Expand Up @@ -114,7 +112,6 @@ const packages = {
Upload,
Tags,
KeyValueEditor,
Editor,
}

export const EmqxMessage = Message
Expand Down
11 changes: 0 additions & 11 deletions packages/style/components/editor.scss

This file was deleted.

1 change: 0 additions & 1 deletion packages/style/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
@import "table.scss";
@import "upload.scss";
@import "card.scss";
@import "editor.scss";
@import "header.scss";
@import "input.scss";
@import "menu-item.scss";
Expand Down
10 changes: 1 addition & 9 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
// eslint-disable-next-line @typescript-eslint/no-var-requires
const CopyPlugin = require('copy-webpack-plugin')

let externals = []
Expand Down Expand Up @@ -32,13 +30,7 @@ module.exports = {
})
},
configureWebpack: {
plugins: [
new MonacoWebpackPlugin({
output: 'static/',
languages: ['json', 'sql'],
}),
new CopyPlugin([{ from: 'packages/style', to: 'style' }]),
],
plugins: [new CopyPlugin([{ from: 'packages/style', to: 'style' }])],
externals: externals,
},
}
Loading

0 comments on commit 71801b0

Please sign in to comment.