mirror of
https://github.com/edems-dev/md-discord-syntax.git
synced 2026-07-22 08:37:37 +00:00
fix(obsidian)
This commit is contained in:
parent
a91bc97119
commit
d21c3b9e22
6 changed files with 18 additions and 18 deletions
|
|
@ -12,7 +12,7 @@ Monorepo bringing Discord-style Markdown formatting (`||spoiler||` and `-# subte
|
|||
| ------- | -------- | ----------- |
|
||||
| [`packages/core`](packages/core) | `@edems-dev/md-discord-syntax-core` | Platform-independent spoiler & subtext rules parser (zero dependencies). |
|
||||
| [`packages/remark`](packages/remark) | `@edems-dev/remark-discord-syntax` | Remark plugin transforming `||spoiler||` and `-# subtext` for MDX. |
|
||||
| [`packages/obsidian`](packages/obsidian) | — | Obsidian Community Plugin adapter (`Discord Syntax`, plugin ID `obsidian-discord-syntax`). |
|
||||
| [`packages/obsidian`](packages/obsidian) | — | Obsidian Community Plugin adapter (`Discord Syntax`, plugin ID `discord-syntax`). |
|
||||
| [`packages/quartz`](packages/quartz) | `@edems-dev/md-discord-syntax-quartz` | Reserved for future Quartz static site generator integration. |
|
||||
|
||||
---
|
||||
|
|
@ -77,7 +77,7 @@ This is a ||spoiler|| block.
|
|||
```bash
|
||||
npm run build --workspace=packages/obsidian
|
||||
```
|
||||
2. Copy `main.js`, `manifest.json`, and `styles.css` into `<vault>/.obsidian/plugins/obsidian-discord-syntax/`.
|
||||
2. Copy `main.js`, `manifest.json`, and `styles.css` into `<vault>/.obsidian/plugins/discord-syntax/`.
|
||||
3. Enable **Discord Syntax** in Obsidian Settings.
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "obsidian-discord-syntax",
|
||||
"id": "discord-syntax",
|
||||
"name": "Discord Syntax",
|
||||
"version": "1.0.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Discord-style spoiler blocks (||spoiler||) and subtext lines (-# subtext) for Obsidian Reading View and Live Preview.",
|
||||
"description": "Discord-style `||spoiler||` and `-# subtext` for Obsidian",
|
||||
"author": "Edems-DEV",
|
||||
"authorUrl": "https://github.com/Edems-DEV",
|
||||
"isDesktopOnly": false
|
||||
|
|
|
|||
10
package-lock.json
generated
10
package-lock.json
generated
|
|
@ -227,6 +227,10 @@
|
|||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/discord-syntax": {
|
||||
"resolved": "packages/obsidian",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.21.5",
|
||||
"dev": true,
|
||||
|
|
@ -804,10 +808,6 @@
|
|||
"@codemirror/view": "6.38.6"
|
||||
}
|
||||
},
|
||||
"node_modules/obsidian-discord-syntax": {
|
||||
"resolved": "packages/obsidian",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.9.6",
|
||||
"dev": true,
|
||||
|
|
@ -1081,7 +1081,7 @@
|
|||
"license": "GPL-3.0"
|
||||
},
|
||||
"packages/obsidian": {
|
||||
"name": "obsidian-discord-syntax",
|
||||
"name": "discord-syntax",
|
||||
"version": "1.0.0",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "obsidian-discord-syntax",
|
||||
"id": "discord-syntax",
|
||||
"name": "Discord Syntax",
|
||||
"version": "1.0.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Discord-style spoiler blocks (||spoiler||) and subtext lines (-# subtext) for Obsidian Reading View and Live Preview.",
|
||||
"description": "Discord-style `||spoiler||` and `-# subtext` for Obsidian",
|
||||
"author": "Edems-DEV",
|
||||
"authorUrl": "https://github.com/Edems-DEV",
|
||||
"isDesktopOnly": false
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "obsidian-discord-syntax",
|
||||
"name": "discord-syntax",
|
||||
"version": "1.0.0",
|
||||
"description": "Discord Syntax Obsidian plugin adapter",
|
||||
"private": true,
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ try {
|
|||
}
|
||||
|
||||
// Ensure Obsidian plugin details
|
||||
if (manifest.id !== 'obsidian-discord-syntax') {
|
||||
exitWithError(`manifest.json id must be "obsidian-discord-syntax", got "${manifest.id}"`);
|
||||
if (manifest.id !== 'discord-syntax') {
|
||||
exitWithError(`manifest.json id must be "discord-syntax", got "${manifest.id}"`);
|
||||
}
|
||||
if (manifest.name !== 'Discord Syntax') {
|
||||
exitWithError(`manifest.json name must be "Discord Syntax", got "${manifest.name}"`);
|
||||
|
|
@ -68,8 +68,8 @@ try {
|
|||
exitWithError(`Failed to read/parse packages/obsidian/package.json: ${e.message}`);
|
||||
}
|
||||
|
||||
if (obsidianPkg.name !== 'obsidian-discord-syntax') {
|
||||
exitWithError(`packages/obsidian/package.json name must be "obsidian-discord-syntax", got "${obsidianPkg.name}"`);
|
||||
if (obsidianPkg.name !== 'discord-syntax') {
|
||||
exitWithError(`packages/obsidian/package.json name must be "discord-syntax", got "${obsidianPkg.name}"`);
|
||||
}
|
||||
|
||||
if (obsidianPkg.version !== manifest.version) {
|
||||
|
|
@ -120,12 +120,12 @@ if (remarkCoreDep.startsWith('file:')) {
|
|||
}
|
||||
|
||||
if (obsidianPkg.dependencies?.['@md-discord-syntax/core']) {
|
||||
exitWithError(`obsidian-discord-syntax still has reference to old scope "@md-discord-syntax/core"`);
|
||||
exitWithError(`discord-syntax still has reference to old scope "@md-discord-syntax/core"`);
|
||||
}
|
||||
|
||||
const obsidianCoreDep = obsidianPkg.dependencies?.['@edems-dev/md-discord-syntax-core'];
|
||||
if (obsidianCoreDep && obsidianCoreDep.startsWith('file:')) {
|
||||
exitWithError(`obsidian-discord-syntax depends on local file spec for "@edems-dev/md-discord-syntax-core" ("${obsidianCoreDep}"). Must use normal semver.`);
|
||||
exitWithError(`discord-syntax depends on local file spec for "@edems-dev/md-discord-syntax-core" ("${obsidianCoreDep}"). Must use normal semver.`);
|
||||
}
|
||||
|
||||
// Ensure published npm packages (core & remark) configure tarballs & safe prepack
|
||||
|
|
|
|||
Loading…
Reference in a new issue