update dir structure

This commit is contained in:
Oleg 2022-08-27 14:48:54 +03:00
parent b6bd2049dd
commit 6674deadff
7 changed files with 8 additions and 6 deletions

View File

@ -8,7 +8,7 @@
This plugin was developed to cover my initial needs and rename a bunch of files and update their reference in code base respectively. So now you can rename a bunch of files from the directory and all imports also will be updated in a code-base This plugin was developed to cover my initial needs and rename a bunch of files and update their reference in code base respectively. So now you can rename a bunch of files from the directory and all imports also will be updated in a code-base
![img.png](assets/img.png) ![img.png](documentation/assets/img.png)
> Under the hood this plugin is using obsidian API for renaming, but we just applying it for many files > Under the hood this plugin is using obsidian API for renaming, but we just applying it for many files

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

10
main.ts
View File

@ -1,6 +1,6 @@
import { App, Plugin, PluginSettingTab, Setting, TFile } from 'obsidian'; import { App, Plugin, PluginSettingTab, Setting, TFile } from 'obsidian';
import { FolderSuggest } from './suggestions/folderSuggest'; import { FolderSuggest } from './src/suggestions/folderSuggest';
import { renderDonateButton } from './components/DonateButton'; import { renderDonateButton } from './src/components/DonateButton';
interface MyPluginSettings { interface MyPluginSettings {
folderName: string; folderName: string;
@ -140,7 +140,9 @@ class BulkRenameSettingsTab extends PluginSettingTab {
text.inputEl.addClass('templater_cmd'); text.inputEl.addClass('templater_cmd');
}) })
.addTextArea((text) => { .addTextArea((text) => {
text.setPlaceholder('How filenames will looks like after replacement(click preview first)'); text.setPlaceholder(
'How filenames will looks like after replacement(click preview first)',
);
replacedPreviewTextArea = text.inputEl; replacedPreviewTextArea = text.inputEl;
const value = getRenderedFileNamesReplaced(this.plugin); const value = getRenderedFileNamesReplaced(this.plugin);
text.setValue(value); text.setValue(value);
@ -168,7 +170,7 @@ class BulkRenameSettingsTab extends PluginSettingTab {
.setName('Replace patterns') .setName('Replace patterns')
.addButton((button) => { .addButton((button) => {
button.buttonEl.style.width = '100%'; button.buttonEl.style.width = '100%';
button.setTooltip('This action cannot be undone!'); button.setTooltip("FYI: We don't have undone button yet!");
button.setButtonText('Rename'); button.setButtonText('Rename');
button.onClick(() => { button.onClick(() => {
const { replacePattern, existingSymbol } = this.plugin.settings; const { replacePattern, existingSymbol } = this.plugin.settings;

View File

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"dev": "node esbuild.config.mjs", "dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json" "version": "node version-bump.mjs && git add manifest.json versions.json && git push origin --tags"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",