nuxt-monaco-editor 1.4.1-alpha.0 → 1.4.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -12
- package/dist/i18n/cs.json +4010 -601
- package/dist/i18n/de.json +4028 -619
- package/dist/i18n/es.json +4015 -606
- package/dist/i18n/fr.json +4027 -618
- package/dist/i18n/it.json +4013 -604
- package/dist/i18n/ja.json +4014 -605
- package/dist/i18n/ko.json +4032 -623
- package/dist/i18n/pl.json +4030 -621
- package/dist/i18n/pt-BR.json +4015 -606
- package/dist/i18n/qps-ploc.json +4006 -597
- package/dist/i18n/ru.json +4028 -619
- package/dist/i18n/tr.json +4017 -608
- package/dist/i18n/zh-hans.json +4029 -620
- package/dist/i18n/zh-hant.json +4043 -634
- package/dist/module.json +1 -1
- package/dist/module.mjs +29 -6
- package/dist/runtime/composables.d.ts +2 -1
- package/package.json +14 -17
package/README.md
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
# Nuxt Monaco Editor
|
|
2
|
+
|
|
2
3
|
[](https://badge.fury.io/js/nuxt-monaco-editor)
|
|
3
4
|
[](https://opensource.org/licenses/MIT)
|
|
4
|
-
[](https://www.codacy.com/gh/e-chan1007/nuxt-monaco-editor/dashboard?utm_source=github.com&
|
|
5
|
+
[](https://www.codacy.com/gh/e-chan1007/nuxt-monaco-editor/dashboard?utm_source=github.com&utm_medium=referral&utm_content=e-chan1007/nuxt-monaco-editor&utm_campaign=Badge_Grade)
|
|
5
6
|
[](https://github.com/e-chan1007/nuxt-monaco-editor/actions/workflows/test.yml)
|
|
6
7
|
|
|
7
8
|
Integrate [monaco-editor](https://microsoft.github.io/monaco-editor/) with Nuxt
|
|
8
9
|
|
|
9
10
|
## Install
|
|
11
|
+
|
|
10
12
|
```sh
|
|
11
13
|
npx nuxi@latest module add nuxt-monaco-editor
|
|
12
14
|
```
|
|
15
|
+
|
|
13
16
|
Don't forget to install `monaco-editor`.
|
|
14
17
|
|
|
15
18
|
## Setup
|
|
19
|
+
|
|
16
20
|
1. Add this module to the Nuxt config
|
|
17
21
|
|
|
18
22
|
```ts
|
|
19
23
|
export default defineNuxtConfig({
|
|
20
|
-
modules: [
|
|
21
|
-
|
|
22
|
-
]
|
|
23
|
-
})
|
|
24
|
+
modules: ["nuxt-monaco-editor"],
|
|
25
|
+
});
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
2. (Optional) Configure the module
|
|
@@ -29,13 +31,13 @@ export default defineNuxtConfig({
|
|
|
29
31
|
export default defineNuxtConfig({
|
|
30
32
|
monacoEditor: {
|
|
31
33
|
// These are default values:
|
|
32
|
-
locale:
|
|
34
|
+
locale: "en",
|
|
33
35
|
componentName: {
|
|
34
|
-
codeEditor:
|
|
35
|
-
diffEditor:
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
})
|
|
36
|
+
codeEditor: "MonacoEditor",
|
|
37
|
+
diffEditor: "MonacoDiffEditor",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
3. Use the component in your pages or components
|
|
@@ -46,11 +48,15 @@ export default defineNuxtConfig({
|
|
|
46
48
|
</template>
|
|
47
49
|
|
|
48
50
|
<script lang="ts" setup>
|
|
49
|
-
const value = ref(
|
|
51
|
+
const value = ref("");
|
|
50
52
|
</script>
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
## Development
|
|
54
56
|
|
|
57
|
+
- Run `git submodule update --init --recursive`.
|
|
55
58
|
- Run `pnpm dev:prepare` to generate type stubs.
|
|
56
59
|
- Use `pnpm dev` to start [playground](./playground) in development mode.
|
|
60
|
+
- Run `pnpm exec playwright-core install --with-deps` to install dependencies for testing.
|
|
61
|
+
- Run `pnpm test` to run tests.
|
|
62
|
+
- Run `pnpm lint` to run linting.
|