Moving .ts files to src. Renaming plugin ids.

This commit is contained in:
Michael J. Pedersen 2023-02-06 14:54:27 -05:00
parent 0295ff4346
commit 03d3ca5b57
6 changed files with 26 additions and 27 deletions

44
.gitignore vendored
View file

@ -1,22 +1,22 @@
# vscode # vscode
.vscode .vscode
# Intellij # Intellij
*.iml *.iml
.idea .idea
# npm # npm
node_modules node_modules
# Don't include the compiled main.js file in the repo. # Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead. # They should be uploaded to GitHub releases instead.
main.js main.js
# Exclude sourcemaps # Exclude sourcemaps
*.map *.map
# obsidian # obsidian
data.json data.json
# Exclude macOS Finder (System Explorer) View States # Exclude macOS Finder (System Explorer) View States
.DS_Store .DS_Store

View file

@ -15,7 +15,7 @@ esbuild.build({
banner: { banner: {
js: banner, js: banner,
}, },
entryPoints: ['main.ts'], entryPoints: ['src/main.ts'],
bundle: true, bundle: true,
external: [ external: [
'obsidian', 'obsidian',

View file

@ -19,7 +19,7 @@ export default class TestingVaultPlugin extends Plugin {
async onload() { async onload() {
// Create a single randomized note of lorem ipsum. // Create a single randomized note of lorem ipsum.
this.addCommand({ this.addCommand({
id: 'testing-vault-single-note', id: 'single-note',
name: 'Make a single randomized note in your vault', name: 'Make a single randomized note in your vault',
callback: () => { callback: () => {
let note = newLoremNote({}); let note = newLoremNote({});
@ -28,15 +28,14 @@ export default class TestingVaultPlugin extends Plugin {
}); });
this.addCommand({ this.addCommand({
id: 'testing-vault-fill-vault', id: 'fill-vault',
name: 'Make a group of randomized notes in your vault', name: 'Make a group of randomized notes in your vault',
callback: () => { callback: () => {
const maxnotes = 1000;
new TestingVaultModal(this.app).open(); new TestingVaultModal(this.app).open();
} }
}); });
this.addCommand({ this.addCommand({
id: 'testing-vault-destroy-vault', id: 'destroy-vault',
name: 'Destroy everything in this vault', name: 'Destroy everything in this vault',
callback: () => { callback: () => {
this.deleteVaultContents(); this.deleteVaultContents();