From 03d3ca5b571a25c2c76af756d898d07e8d53297d Mon Sep 17 00:00:00 2001 From: "Michael J. Pedersen" Date: Mon, 6 Feb 2023 14:54:27 -0500 Subject: [PATCH] Moving .ts files to src. Renaming plugin ids. --- .gitignore | 44 +++++++++++++++--------------- esbuild.config.mjs | 2 +- loremnotes.ts => src/loremnotes.ts | 0 main.ts => src/main.ts | 7 ++--- random.ts => src/random.ts | 0 vault.ts => src/vault.ts | 0 6 files changed, 26 insertions(+), 27 deletions(-) rename loremnotes.ts => src/loremnotes.ts (100%) rename main.ts => src/main.ts (89%) rename random.ts => src/random.ts (100%) rename vault.ts => src/vault.ts (100%) diff --git a/.gitignore b/.gitignore index e09a007..386ac2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,22 @@ -# vscode -.vscode - -# Intellij -*.iml -.idea - -# npm -node_modules - -# Don't include the compiled main.js file in the repo. -# They should be uploaded to GitHub releases instead. -main.js - -# Exclude sourcemaps -*.map - -# obsidian -data.json - -# Exclude macOS Finder (System Explorer) View States -.DS_Store +# vscode +.vscode + +# Intellij +*.iml +.idea + +# npm +node_modules + +# Don't include the compiled main.js file in the repo. +# They should be uploaded to GitHub releases instead. +main.js + +# Exclude sourcemaps +*.map + +# obsidian +data.json + +# Exclude macOS Finder (System Explorer) View States +.DS_Store diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 8e2dad0..b33ec53 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -15,7 +15,7 @@ esbuild.build({ banner: { js: banner, }, - entryPoints: ['main.ts'], + entryPoints: ['src/main.ts'], bundle: true, external: [ 'obsidian', diff --git a/loremnotes.ts b/src/loremnotes.ts similarity index 100% rename from loremnotes.ts rename to src/loremnotes.ts diff --git a/main.ts b/src/main.ts similarity index 89% rename from main.ts rename to src/main.ts index 8bbd015..4df0af3 100644 --- a/main.ts +++ b/src/main.ts @@ -19,7 +19,7 @@ export default class TestingVaultPlugin extends Plugin { async onload() { // Create a single randomized note of lorem ipsum. this.addCommand({ - id: 'testing-vault-single-note', + id: 'single-note', name: 'Make a single randomized note in your vault', callback: () => { let note = newLoremNote({}); @@ -28,15 +28,14 @@ export default class TestingVaultPlugin extends Plugin { }); this.addCommand({ - id: 'testing-vault-fill-vault', + id: 'fill-vault', name: 'Make a group of randomized notes in your vault', callback: () => { - const maxnotes = 1000; new TestingVaultModal(this.app).open(); } }); this.addCommand({ - id: 'testing-vault-destroy-vault', + id: 'destroy-vault', name: 'Destroy everything in this vault', callback: () => { this.deleteVaultContents(); diff --git a/random.ts b/src/random.ts similarity index 100% rename from random.ts rename to src/random.ts diff --git a/vault.ts b/src/vault.ts similarity index 100% rename from vault.ts rename to src/vault.ts