Skip to content

Commit

Permalink
chore: upgrade deps and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Sep 8, 2023
1 parent 035d291 commit d1de821
Show file tree
Hide file tree
Showing 12 changed files with 2,642 additions and 1,060 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"root": true,
"extends": ["@nuxt/eslint-config"],
"rules": {
"semi": ["error", "never"],
"quotes": ["error", "single"],
"quote-props": ["error", "as-needed"],
"vue/multi-word-component-names": "off"
}
}
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
7 changes: 0 additions & 7 deletions build.config.ts

This file was deleted.

30 changes: 20 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,35 @@
"version": "0.1.0",
"license": "MIT",
"description": "Integrate Docus Markdown with Monaco Editor",
"main": "./dist/index.js",
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"dev": "vite -c playground/vite.config.js",
"lint": "eslint .",
"build": "unbuild"
},
"devDependencies": {
"@antfu/utils": "^0.3.0",
"@vitejs/plugin-vue": "^1.9.4",
"@vue/compiler-sfc": "^3.2.21",
"@vueuse/core": "^6.7.4",
"monaco-editor": "^0.29.1",
"monaco-editor-core": "^0.29.2",
"unbuild": "^0.5.11",
"vite": "^2.6.13",
"vue": "^3.2.21"
"@antfu/utils": "^0.7.6",
"@nuxt/eslint-config": "^0.2.0",
"@vitejs/plugin-vue": "^4.3.4",
"@vue/compiler-sfc": "^3.3.4",
"@vueuse/core": "^10.4.1",
"eslint": "^8.48.0",
"monaco-editor": "^0.41.0",
"monaco-editor-core": "^0.41.0",
"unbuild": "^2.0.0",
"vite": "^4.4.9",
"vue": "^3.3.4"
},
"build": {
"entries": [
"./src/index"
],
"externals": ["monaco-editor-core"],
"declaration": true
}
}
72 changes: 70 additions & 2 deletions playground/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<template>
<div class="h-full default-theme" :push-other-panes="false">
<Editor class="editor" :file="currentFile" />
<div
class="h-full default-theme"
:push-other-panes="false"
>
<Editor
class="editor"
:file="currentFile"
/>
</div>
</template>

Expand All @@ -16,6 +22,68 @@ Inline :block
Inline :block[with content]
-->
# The "ı" character
The "ı" character
\`\`\`
code
\`\`\`
\`\`\`ts
const a = true
class B {
private const b = true
}
\`\`\`
\`\`\`ts meta data
const a = true
class B {
private const b = true
}
\`\`\`
\`\`\`ts [help]
const ts = "help"
const a = 3
class B {
private const b = true
// help
}
\`\`\`
\`\`\`ts {1,2}
const ts = "help"
const a = 3
class B {
private const b = true
// help
}
\`\`\`
\`\`\`ts {1,2} [filename]
const ts = "help"
const a = 3
class B {
private const b = true
// help
}
\`\`\`
\`\`\`ts [help] {1,3}
const ts = "help"
const a = 3
class B {
private const b = true
// help
}
\`\`\`
[Span]
[Span]{with="attribute"}
Expand Down
10 changes: 4 additions & 6 deletions playground/src/components/Editor.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<Monaco :value="raw" language="docus-markdown" @change="update" />
<Monaco
:value="raw"
language="docus-markdown"
/>
</template>

<script setup lang="ts">
Expand All @@ -14,9 +17,4 @@ const props = defineProps({
})
const raw = ref(props.file)
function update(content) {
}
</script>
5 changes: 4 additions & 1 deletion playground/src/components/Monaco.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ emit('change', props.value)
</script>

<template>
<div ref="target" style="height: 100vh"></div>
<div
ref="target"
style="height: 100vh"
/>
</template>
2 changes: 1 addition & 1 deletion playground/src/composables/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const setupMonaco = createSingletonPromise(async () => {
})
monaco.languages.register({id: 'docus-markdown'})
// Register a tokens provider for the language
monaco.languages.setMonarchTokensProvider('docus-markdown', markdownLanguage);
monaco.languages.setMonarchTokensProvider('docus-markdown', markdownLanguage)

return { monaco }
})
Expand Down
Loading

0 comments on commit d1de821

Please sign in to comment.