nuxt-monaco-editor 1.0.1 → 1.0.3
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/CHANGELOG.md +14 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +12 -10
- package/package.json +13 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.3](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.0.2...v1.0.3) (2022-10-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* follow changes in v3.0.0-rc.12 ([04f4bbb](https://github.com/e-chan1007/nuxt-monaco-editor/commit/04f4bbb4fbee89940108f2c54c03561f065ff9ad))
|
|
11
|
+
|
|
12
|
+
### [1.0.2](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.0.1...v1.0.2) (2022-09-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Fix
|
|
16
|
+
|
|
17
|
+
* update nuxt version constraint ([dde8980](https://github.com/e-chan1007/nuxt-monaco-editor/commit/dde898012a3313040121fac136f24d43f14e4f94))
|
|
18
|
+
|
|
5
19
|
### [1.0.1](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.0.0...v1.0.1) (2022-08-26)
|
|
6
20
|
|
|
7
21
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import { defineNuxtModule, createResolver,
|
|
2
|
+
import { defineNuxtModule, createResolver, extendViteConfig, checkNuxtCompatibility, addPlugin, addComponent, addImports } from '@nuxt/kit';
|
|
3
3
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
4
4
|
|
|
5
5
|
// -- Unbuild CommonJS Shims --
|
|
@@ -23,7 +23,7 @@ const module = defineNuxtModule({
|
|
|
23
23
|
meta: {
|
|
24
24
|
name: "nuxt-monaco-editor",
|
|
25
25
|
configKey: "monacoEditor",
|
|
26
|
-
compatibility: { nuxt: "^3.0.0" }
|
|
26
|
+
compatibility: { nuxt: "^3.0.0-rc.9" }
|
|
27
27
|
},
|
|
28
28
|
defaults: DEFAULTS,
|
|
29
29
|
setup(options, nuxt) {
|
|
@@ -35,18 +35,20 @@ const module = defineNuxtModule({
|
|
|
35
35
|
nuxt.options.build.transpile.push("monaco-editor");
|
|
36
36
|
nuxt.options.runtimeConfig.app.__MONACO_EDITOR_LOCALE__ = options.locale;
|
|
37
37
|
nuxt.options.runtimeConfig.app.__MONACO_EDITOR_LOCATION__ = monacoEditorLocation;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
extendViteConfig(async (config) => {
|
|
39
|
+
const shouldAppendURLPrefix = await checkNuxtCompatibility({ nuxt: "^3.0.0-rc.12" }) && nuxt.options.dev;
|
|
40
|
+
const viteStaticCopyPlugin = viteStaticCopy({
|
|
41
|
+
targets: [{
|
|
42
|
+
src: require.resolve("monaco-editor/min/vs/loader.js").replace(/\\/g, "/").replace(/\/vs\/loader\.js$/, "/*"),
|
|
43
|
+
dest: (shouldAppendURLPrefix ? "__url/" : "") + monacoEditorLocation.slice(1)
|
|
44
|
+
}]
|
|
45
|
+
});
|
|
46
|
+
config.plugins.push(...viteStaticCopyPlugin);
|
|
43
47
|
});
|
|
44
|
-
addVitePlugin(viteStaticCopyServePlugin);
|
|
45
|
-
addVitePlugin(viteStaticCopyBuildPlugin);
|
|
46
48
|
addPlugin(resolve("plugin.client"));
|
|
47
49
|
addComponent({ name: options.componentName.codeEditor, filePath: resolve("MonacoEditor.vue") });
|
|
48
50
|
addComponent({ name: options.componentName.diffEditor, filePath: resolve("MonacoDiffEditor.vue") });
|
|
49
|
-
|
|
51
|
+
addImports({ name: "useMonaco", as: "useMonaco", from: resolve("composables") });
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-monaco-editor",
|
|
3
|
+
"description": "Integrate monaco-editor with Nuxt (3)",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"monaco-editor",
|
|
6
|
+
"nuxt"
|
|
7
|
+
],
|
|
3
8
|
"author": "e-chan1007",
|
|
9
|
+
"homepage": "https://e-chan1007.github.io/nuxt-monaco-editor",
|
|
4
10
|
"repository": {
|
|
5
11
|
"type": "git",
|
|
6
12
|
"url": "https://github.com/e-chan1007/nuxt-monaco-editor.git"
|
|
7
13
|
},
|
|
8
|
-
"version": "1.0.
|
|
14
|
+
"version": "1.0.3",
|
|
9
15
|
"type": "module",
|
|
10
16
|
"license": "MIT",
|
|
11
17
|
"exports": {
|
|
@@ -34,18 +40,18 @@
|
|
|
34
40
|
"docs:serve": "vuepress serve docs --port 3000"
|
|
35
41
|
},
|
|
36
42
|
"dependencies": {
|
|
37
|
-
"@nuxt/kit": "^3.0.0-rc.
|
|
38
|
-
"vite-plugin-static-copy": "^0.
|
|
43
|
+
"@nuxt/kit": "^3.0.0-rc.12",
|
|
44
|
+
"vite-plugin-static-copy": "^0.9.0"
|
|
39
45
|
},
|
|
40
46
|
"devDependencies": {
|
|
41
|
-
"@commitlint/cli": "^17.
|
|
42
|
-
"@commitlint/config-conventional": "^17.0
|
|
47
|
+
"@commitlint/cli": "^17.1.2",
|
|
48
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
43
49
|
"@nuxt/module-builder": "latest",
|
|
44
50
|
"@nuxtjs/eslint-config-typescript": "latest",
|
|
45
51
|
"eslint": "latest",
|
|
46
52
|
"husky": "^8.0.1",
|
|
47
|
-
"monaco-editor": "^0.34.
|
|
48
|
-
"nuxt": "
|
|
53
|
+
"monaco-editor": "^0.34.1",
|
|
54
|
+
"nuxt": "3.0.0-rc.12",
|
|
49
55
|
"pinst": "^3.0.0",
|
|
50
56
|
"remark-cli": "^11.0.0",
|
|
51
57
|
"remark-lint": "^9.1.1",
|