This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to CM6 and various other items that work to various degrees
- Loading branch information
1 parent
0ebdf9a
commit 2c30a6e
Showing
21 changed files
with
1,090 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 4 | ||
tab_width = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
|
||
main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"env": { "node": true }, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"no-prototype-builtins": "off", | ||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tag-version-prefix="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import esbuild from "esbuild"; | ||
import process from "process"; | ||
import builtins from "builtin-modules"; | ||
|
||
const banner = `/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD | ||
if you want to view the source, please visit the github repository of this plugin | ||
*/ | ||
`; | ||
|
||
const prod = process.argv[2] === "production"; | ||
|
||
const context = await esbuild.context({ | ||
banner: { | ||
js: banner, | ||
}, | ||
entryPoints: ["./src/main.ts"], | ||
bundle: true, | ||
external: [ | ||
"obsidian", | ||
"codemirror", | ||
"@codemirror/autocomplete", | ||
"@codemirror/closebrackets", | ||
"@codemirror/collab", | ||
"@codemirror/commands", | ||
"@codemirror/comment", | ||
"@codemirror/fold", | ||
"@codemirror/gutter", | ||
"@codemirror/highlight", | ||
"@codemirror/history", | ||
"@codemirror/language", | ||
"@codemirror/lint", | ||
"@codemirror/matchbrackets", | ||
"@codemirror/panel", | ||
"@codemirror/rangeset", | ||
"@codemirror/rectangular-selection", | ||
"@codemirror/search", | ||
"@codemirror/state", | ||
"@codemirror/stream-parser", | ||
"@codemirror/text", | ||
"@codemirror/tooltip", | ||
"@codemirror/view", | ||
"@lezer/common", | ||
"@lezer/lr", | ||
...builtins, | ||
], | ||
format: "cjs", | ||
target: "es2018", | ||
logLevel: "info", | ||
sourcemap: prod ? false : "inline", | ||
treeShaking: true, | ||
outfile: "main.js", | ||
}); | ||
|
||
if (prod) { | ||
await context.rebuild(); | ||
process.exit(0); | ||
} else { | ||
await context.watch(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
{ | ||
"name": "obsidian-plaintext", | ||
"version": "0.2.0", | ||
"description": "Allow opening specified files as plaintext.", | ||
"version": "0.3.0", | ||
"description": "Open any file as if it was plaintext directly in Obsidian.", | ||
"main": "main.js", | ||
"scripts": { | ||
"dev": "rollup --config rollup.config.js -w", | ||
"build": "rollup --config rollup.config.js --environment BUILD:production" | ||
"dev": "node esbuild.config.mjs", | ||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", | ||
"version": "node version-bump.mjs && git add manifest.json versions.json" | ||
}, | ||
"keywords": [], | ||
"author": "dbarenholz", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.1.1", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@types/node": "^17.0.4", | ||
"codemirror": "^5.65.0", | ||
"obsidian": "^0.13.11", | ||
"rollup": "^2.62.0", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.5.4" | ||
"@codemirror/lang-python": "^6.1.2", | ||
"@types/node": "^16.11.6", | ||
"@typescript-eslint/eslint-plugin": "5.29.0", | ||
"@typescript-eslint/parser": "5.29.0", | ||
"builtin-modules": "3.3.0", | ||
"codemirror": "^6.0.1", | ||
"esbuild": "0.17.3", | ||
"obsidian": "latest", | ||
"tslib": "2.4.0", | ||
"typescript": "4.7.4" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.