Skip to content

Commit 298d47e

Browse files
committed
Merge branch 'master' into release
2 parents 409ce83 + d9668ce commit 298d47e

30 files changed

+3835
-480
lines changed

.gitignore

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1-
# vscode
2-
.vscode
3-
4-
# Intellij
5-
*.iml
6-
.idea
7-
8-
# npm
9-
node_modules
10-
11-
# Don't include the compiled main.js file in the repo.
12-
# They should be uploaded to GitHub releases instead.
13-
main.js
14-
15-
# Exclude sourcemaps
16-
*.map
17-
18-
# obsidian
19-
data.json
20-
21-
# Exclude macOS Finder (System Explorer) View States
22-
.DS_Store
1+
# vscode
2+
.vscode
3+
4+
# Intellij
5+
*.iml
6+
.idea
7+
8+
# npm
9+
node_modules
10+
11+
# Don't include the compiled main.js file in the repo.
12+
# They should be uploaded to GitHub releases instead.
13+
main.js
14+
15+
# Exclude sourcemaps
16+
*.map
17+
18+
# obsidian
19+
data.json
20+
21+
# Exclude macOS Finder (System Explorer) View States
22+
.DS_Store
23+
24+
!exampleVault/.obsidian
25+
26+
exampleVault/.obsidian/*
27+
!exampleVault/.obsidian/plugins
28+
29+
exampleVault/.obsidian/plugins/*
30+
!exampleVault/.obsidian/plugins/obsidian-meta-bind-plugin
31+
!exampleVault/.obsidian/plugins/obsidian-meta-bind-plugin/main.js

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Obsidian Meta Bind Plugin
22
This plugin can create input fields inside your notes and bind them to metadata fields.
33

4-
### UNDER CONSTRUCTION
5-
This plugin is not yet finished.
6-
74
### How to use
85
To create an input field you have to write an inline code block or normal code block starting with `INPUT`. Then in square brackets the type of input field, in round brackets arguments and finally behind a colon the metadata field to bind to.
96

@@ -17,6 +14,8 @@ The plugin also allows further customization with arguments. So the complete syn
1714
INPUT[input_type(argument_name(argument_value), argument_name_2, ...):file_name_or_path#metadata_field]
1815
```
1916

17+
For more examples see the `exampleVault` folder.
18+
2019
#### Input field types
2120
- `slider` a slider from 0 to 100 (custom ranges can be set using `minValue` and `maxValue`, see below)
2221
- `toggle` a toggle element
@@ -35,8 +34,6 @@ INPUT[input_type(argument_name(argument_value), argument_name_2, ...):file_name_
3534
- `title(value)` only for (multi-)selects, adds a title to the select input
3635

3736
### How to install
38-
This plugin is still in **beta**.
39-
4037
You must manually download the zip archive from the latest release here on GitHub.
4138
After downloading, extract the archive into the `.obsidian/plugins` folder in your vault.
4239

esbuild.dev.config.mjs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import esbuild from "esbuild";
2+
import process from "process";
3+
import builtins from 'builtin-modules'
4+
import copy from 'esbuild-plugin-copy-watch'
5+
6+
const banner =
7+
`/*
8+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
9+
if you want to view the source, please visit the github repository of this plugin
10+
*/
11+
`;
12+
13+
const prod = (process.argv[2] === 'production');
14+
15+
esbuild.build({
16+
banner: {
17+
js: banner,
18+
},
19+
entryPoints: ['src/main.ts'],
20+
bundle: true,
21+
external: [
22+
'obsidian',
23+
'electron',
24+
'@codemirror/autocomplete',
25+
'@codemirror/closebrackets',
26+
'@codemirror/collab',
27+
'@codemirror/commands',
28+
'@codemirror/comment',
29+
'@codemirror/fold',
30+
'@codemirror/gutter',
31+
'@codemirror/highlight',
32+
'@codemirror/history',
33+
'@codemirror/language',
34+
'@codemirror/lint',
35+
'@codemirror/matchbrackets',
36+
'@codemirror/panel',
37+
'@codemirror/rangeset',
38+
'@codemirror/rectangular-selection',
39+
'@codemirror/search',
40+
'@codemirror/state',
41+
'@codemirror/stream-parser',
42+
'@codemirror/text',
43+
'@codemirror/tooltip',
44+
'@codemirror/view',
45+
...builtins],
46+
format: 'cjs',
47+
watch: !prod,
48+
target: 'es2016',
49+
logLevel: "info",
50+
sourcemap: prod ? false : 'inline',
51+
treeShaking: true,
52+
outdir: 'exampleVault/.obsidian/plugins/obsidian-meta-bind-plugin/',
53+
outbase: 'src',
54+
plugins: [
55+
copy([
56+
{
57+
from: './styles.css',
58+
to: '',
59+
},
60+
{
61+
from: './manifest.json',
62+
to: '',
63+
},
64+
])
65+
]
66+
}).catch(() => process.exit(1));

exampleVault/.obsidian/plugins/obsidian-meta-bind-plugin/.hotreload

Whitespace-only changes.

0 commit comments

Comments
 (0)