Skip to content

Commit fbd1b41

Browse files
committed
prep for release
1 parent 6f6b5f4 commit fbd1b41

File tree

7 files changed

+31
-36
lines changed

7 files changed

+31
-36
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ New Features
1212
- `VIEW[{a} * {b}]` or `VIEW[{a} * {b}][math]` this does math as before
1313
- `VIEW[this is plain text][text]` this renders as plain text
1414
- `VIEW[this is **markdown**][text(renderMarkdown)]` this renders as markdown
15-
- `VIEW[this is hidden][text(hidden)]` this does not render
15+
- `VIEW[this is hidden][text(hidden)]` this does not render, useful for computations that save their value
1616
- View Fields can now save their computed value to another frontmatter property
1717
- `VIEW[{a} * {b}][math:c]` will save `a * b` in `c`
1818
- Meta Bind Table, a way to build an expandable table from an array of objects where each cell is an input or view field

esbuild.config.mjs

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@ import process from 'process';
33
import builtins from 'builtin-modules';
44
import esbuildSvelte from 'esbuild-svelte';
55
import sveltePreprocess from 'svelte-preprocess';
6-
import conditionalBuild from 'esbuild-plugin-conditional-build';
6+
import manifest from './manifest.json' assert { type: "json" };
77

88
const banner = `/*
9+
-------------------------------------------
10+
${manifest.name} - Release Build
11+
-------------------------------------------
12+
By: ${manifest.author} (${manifest.authorUrl})
13+
Time: ${new Date().toUTCString()}
14+
Version: ${manifest.version}
15+
-------------------------------------------
916
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
1017
if you want to view the source, please visit the github repository of this plugin
1118
*/
1219
`;
1320

14-
const prod = process.argv[2] === 'production';
15-
1621
esbuild
1722
.build({
1823
banner: {
@@ -24,32 +29,22 @@ esbuild
2429
'obsidian',
2530
'electron',
2631
'@codemirror/autocomplete',
27-
'@codemirror/closebrackets',
2832
'@codemirror/collab',
2933
'@codemirror/commands',
30-
'@codemirror/comment',
31-
'@codemirror/fold',
32-
'@codemirror/gutter',
33-
'@codemirror/highlight',
34-
'@codemirror/history',
3534
'@codemirror/language',
3635
'@codemirror/lint',
37-
'@codemirror/matchbrackets',
38-
'@codemirror/panel',
39-
'@codemirror/rangeset',
40-
'@codemirror/rectangular-selection',
4136
'@codemirror/search',
4237
'@codemirror/state',
43-
'@codemirror/stream-parser',
44-
'@codemirror/text',
45-
'@codemirror/tooltip',
4638
'@codemirror/view',
39+
'@lezer/common',
40+
'@lezer/highlight',
41+
'@lezer/lr',
4742
...builtins,
4843
],
4944
format: 'cjs',
5045
target: 'es2018',
5146
logLevel: 'info',
52-
sourcemap: prod ? false : 'inline',
47+
sourcemap: false,
5348
treeShaking: true,
5449
outfile: 'main.js',
5550
minify: true,
@@ -58,7 +53,6 @@ esbuild
5853
compilerOptions: { css: true },
5954
preprocess: sveltePreprocess(),
6055
}),
61-
conditionalBuild([]),
6256
],
6357
})
6458
.catch(() => process.exit(1));

esbuild.dev.config.mjs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ import builtins from 'builtin-modules';
44
import copy from 'esbuild-plugin-copy-watch';
55
import esbuildSvelte from 'esbuild-svelte';
66
import sveltePreprocess from 'svelte-preprocess';
7+
import manifest from './manifest.json' assert { type: "json" };
78

89
const banner = `/*
10+
-------------------------------------------
11+
${manifest.name} - Dev Build
12+
-------------------------------------------
13+
By: ${manifest.author} (${manifest.authorUrl})
14+
Time: ${new Date().toUTCString()}
15+
Version: Dev Build
16+
-------------------------------------------
917
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
1018
if you want to view the source, please visit the github repository of this plugin
1119
*/
@@ -22,34 +30,24 @@ const context = await esbuild
2230
'obsidian',
2331
'electron',
2432
'@codemirror/autocomplete',
25-
'@codemirror/closebrackets',
2633
'@codemirror/collab',
2734
'@codemirror/commands',
28-
'@codemirror/comment',
29-
'@codemirror/fold',
30-
'@codemirror/gutter',
31-
'@codemirror/highlight',
32-
'@codemirror/history',
3335
'@codemirror/language',
3436
'@codemirror/lint',
35-
'@codemirror/matchbrackets',
36-
'@codemirror/panel',
37-
'@codemirror/rangeset',
38-
'@codemirror/rectangular-selection',
3937
'@codemirror/search',
4038
'@codemirror/state',
41-
'@codemirror/stream-parser',
42-
'@codemirror/text',
43-
'@codemirror/tooltip',
4439
'@codemirror/view',
40+
'@lezer/common',
41+
'@lezer/highlight',
42+
'@lezer/lr',
4543
...builtins,
4644
],
4745
format: 'cjs',
48-
target: 'es2016',
46+
target: 'es2018',
4947
logLevel: 'info',
5048
sourcemap: 'inline',
5149
treeShaking: true,
52-
outdir: 'exampleVault/.obsidian/plugins/obsidian-meta-bind-plugin/',
50+
outdir: `exampleVault/.obsidian/plugins/${manifest.id}/`,
5351
outbase: 'src',
5452
plugins: [
5553
copy({

exampleVault/View Fields/View Field.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ Hidden: `VIEW[**{distance}**][text(hidden):computed]`
3535
Display Computed: `VIEW[{computed}][text()]`
3636
Display Computed as Markdown: `VIEW[{computed}][text(renderMarkdown)]`
3737
Loop Error: `VIEW[**{computed}**][text():distance]`
38+
Self Loop Error: `VIEW[**{computed}**][text():computed]`

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"@opd-libs/opd-utils-lib": "0.0.2",
5454
"@popperjs/core": "^2.11.8",
5555
"@ungap/structured-clone": "^1.2.0",
56-
"esbuild-plugin-conditional-build": "^1.0.2",
5756
"mathjs": "^11.8.0",
5857
"obsidian-svelte": "^0.1.9",
5958
"svelte-portal": "^2.2.0"

src/metaBindTable/MetaBindTableCellComponent.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@
2020
});
2121
</script>
2222

23-
<td bind:this={element}></td>
23+
<td>
24+
<div bind:this={element}></div>
25+
</td>

src/metaBindTable/MetaBindTableComponent.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
{#each tableHead as headCell}
2222
<th>{headCell}</th>
2323
{/each}
24+
<th></th>
2425
</tr>
2526
</thead>
2627
<tbody>

0 commit comments

Comments
 (0)