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 CHANGED
@@ -1,26 +1,28 @@
1
1
  # Nuxt Monaco Editor
2
+
2
3
  [![npm version](https://badge.fury.io/js/nuxt-monaco-editor.svg)](https://badge.fury.io/js/nuxt-monaco-editor)
3
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
- [![Codacy Badge](https://app.codacy.com/project/badge/Grade/8b4585be9901491795f8b3c2f5dbb680)](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
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/8b4585be9901491795f8b3c2f5dbb680)](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
  [![Test result](https://github.com/e-chan1007/nuxt-monaco-editor/actions/workflows/test.yml/badge.svg)](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
- 'nuxt-monaco-editor'
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: 'en',
34
+ locale: "en",
33
35
  componentName: {
34
- codeEditor: 'MonacoEditor',
35
- diffEditor: 'MonacoDiffEditor'
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.