2 Commits

Author SHA1 Message Date
c92d27be53 Merge pull request #2 from maksim77/dependabot/npm_and_yarn/esbuild-0.25.0
Bump esbuild from 0.14.47 to 0.25.0
2025-02-11 08:29:52 +03:00
dependabot[bot]
878858308b Bump esbuild from 0.14.47 to 0.25.0
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.47 to 0.25.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2022.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.47...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 20:33:01 +00:00
3 changed files with 2 additions and 3772 deletions

50
main.ts
View File

@@ -1,24 +1,10 @@
import { Editor, MarkdownView, Plugin, TFile, PluginSettingTab, App, Setting } from 'obsidian';
import { Editor, MarkdownView, Plugin, TFile } from 'obsidian';
import { exec } from "child_process";
const plist = require('plist');
interface MacTagSettings {
writeOnSave: boolean;
}
const DEFAULT_SETTINGS: MacTagSettings = {
writeOnSave: true
}
export default class MacTagPlugin extends Plugin {
settings: MacTagSettings;
async onload() {
await this.loadSettings();
this.addSettingTab(new MacTagSettingTab(this.app, this));
this.addCommand({
id: 'write-macos-tag',
name: "Write Mac OS tags",
@@ -44,15 +30,6 @@ export default class MacTagPlugin extends Plugin {
onunload() {
}
async loadSettings() {
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
}
async saveSettings() {
await this.saveData(this.settings);
}
writeTags(file: TFile) {
//@ts-ignore
const fileWithPath = `${this.app.vault.adapter.basePath}/${file.path}`;
@@ -89,28 +66,3 @@ export default class MacTagPlugin extends Plugin {
return tags.map((s: string)=> s.replace("#", ""))
}
}
class MacTagSettingTab extends PluginSettingTab {
plugin: MacTagPlugin;
constructor(app: App, plugin: MacTagPlugin) {
super(app, plugin);
this.plugin = plugin;
}
display(): void {
const {containerEl} = this;
containerEl.empty();
containerEl.createEl('h2', {text: 'Settings for Mac Tagger Plugin.'});
new Setting(containerEl)
.setName('Write on Save')
.setDesc('Check the box if you want to save tags when saving the file.')
.addToggle(tc => tc.onChange(async (value) => {
this.plugin.settings.writeOnSave = value;
await this.plugin.saveSettings();
}))
}
}

3722
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@
"@typescript-eslint/eslint-plugin": "5.29.0",
"@typescript-eslint/parser": "5.29.0",
"builtin-modules": "3.3.0",
"esbuild": "0.14.47",
"esbuild": "0.25.0",
"obsidian": "latest",
"tslib": "2.4.0",
"typescript": "4.7.4"