Update plugin template with initial data
This commit is contained in:
@@ -5,7 +5,8 @@ import builtins from "builtin-modules";
|
||||
const banner =
|
||||
`/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
if you want to view the source, please visit the github repository of this plugin:
|
||||
https://github.com/evanharmon1
|
||||
*/
|
||||
`;
|
||||
|
||||
|
||||
18
main.ts
18
main.ts
@@ -2,16 +2,16 @@ import { App, Editor, MarkdownView, Modal, Notice, Plugin, PluginSettingTab, Set
|
||||
|
||||
// Remember to rename these classes and interfaces!
|
||||
|
||||
interface MyPluginSettings {
|
||||
interface WikipediaDataSettings {
|
||||
mySetting: string;
|
||||
}
|
||||
|
||||
const DEFAULT_SETTINGS: MyPluginSettings = {
|
||||
const DEFAULT_SETTINGS: WikipediaDataSettings = {
|
||||
mySetting: 'default'
|
||||
}
|
||||
|
||||
export default class MyPlugin extends Plugin {
|
||||
settings: MyPluginSettings;
|
||||
export default class WikipediaData extends Plugin {
|
||||
settings: WikipediaDataSettings;
|
||||
|
||||
async onload() {
|
||||
await this.loadSettings();
|
||||
@@ -19,7 +19,7 @@ export default class MyPlugin extends Plugin {
|
||||
// This creates an icon in the left ribbon.
|
||||
const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => {
|
||||
// Called when the user clicks the icon.
|
||||
new Notice('This is a notice!');
|
||||
new Notice('This is a notice Hello World!');
|
||||
});
|
||||
// Perform additional things with the ribbon
|
||||
ribbonIconEl.addClass('my-plugin-ribbon-class');
|
||||
@@ -66,7 +66,7 @@ export default class MyPlugin extends Plugin {
|
||||
});
|
||||
|
||||
// This adds a settings tab so the user can configure various aspects of the plugin
|
||||
this.addSettingTab(new SampleSettingTab(this.app, this));
|
||||
this.addSettingTab(new WikipediaDataSettingTab(this.app, this));
|
||||
|
||||
// If the plugin hooks up any global DOM events (on parts of the app that doesn't belong to this plugin)
|
||||
// Using this function will automatically remove the event listener when this plugin is disabled.
|
||||
@@ -107,10 +107,10 @@ class SampleModal extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
class SampleSettingTab extends PluginSettingTab {
|
||||
plugin: MyPlugin;
|
||||
class WikipediaDataSettingTab extends PluginSettingTab {
|
||||
plugin: WikipediaData;
|
||||
|
||||
constructor(app: App, plugin: MyPlugin) {
|
||||
constructor(app: App, plugin: WikipediaData) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"id": "sample-plugin",
|
||||
"name": "Sample Plugin",
|
||||
"id": "obsidian-wikipedia-data",
|
||||
"name": "Wikipedia Data",
|
||||
"version": "1.0.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "This is a sample plugin for Obsidian. This plugin demonstrates some of the capabilities of the Obsidian API.",
|
||||
"author": "Obsidian",
|
||||
"authorUrl": "https://obsidian.md",
|
||||
"fundingUrl": "https://obsidian.md/pricing",
|
||||
"description": "Query Wikipedia APIs and insert data with template variables.",
|
||||
"author": "Evan Harmon",
|
||||
"authorUrl": "https://www.evanharmon.com",
|
||||
"fundingUrl": "https://www.evanharmon.com",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
||||
2221
package-lock.json
generated
Normal file
2221
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "obsidian-sample-plugin",
|
||||
"name": "obsidian-wikipedia-data",
|
||||
"version": "1.0.0",
|
||||
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
|
||||
"description": "Query Wikipedia APIs and insert data with template variables.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
@@ -9,7 +9,7 @@
|
||||
"version": "node version-bump.mjs && git add manifest.json versions.json"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"author": "Evan Harmon",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.6",
|
||||
|
||||
Reference in New Issue
Block a user