From aecc3d1e2e9cf9867a562bfda60329301e097851 Mon Sep 17 00:00:00 2001 From: Danny Hammer Date: Tue, 2 Jul 2024 11:29:50 -0600 Subject: [PATCH] refactor: adjusted file structure for extension descriptions --- README.md | 13 +++++++------ .../descriptions}/description-en.md | 0 {contributions => assets}/displayData.json | 2 +- manifest.json | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) rename {contributions => assets/descriptions}/description-en.md (100%) rename {contributions => assets}/displayData.json (75%) diff --git a/README.md b/README.md index 06607ae..c4b7318 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,9 @@ To make the process of customizing from the template as smooth as possible, we r - Replace the description with your own description - Update ownership information and other relevant fields as desired -- In `contributions/displayData.json`: +- In `assets/displayData.json`: - - If your extension has an icon, update the `icon` value to point towards the icon file (for example: `./assets/icon.svg`) + - If your extension has an icon, update the `icon` value to point towards the icon file (for example: `assets/icon.svg`) - Update the `en` entry of `localizedDisplayInfo` so that: - `displayName` contains a human-readable name for your extension (i.e. `Your Extension Name`). @@ -82,10 +82,11 @@ The general file structure is as follows: - `src/types/paranext-extension-template.d.ts` is this extension's types file that defines how other extensions can use this extension through the `papi`. It is copied into the build folder - `*.web-view.tsx` files will be treated as React WebViews - `*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality) -- `assets/` contains asset files the extension and its WebViews can retrieve using the `papi-extension:` protocol. It is copied into the build folder -- `contributions/` contains JSON files the platform uses to extend data structures for things like menus, settings, and descriptions. The JSON files are referenced from the manifest - - `contributions/displayData.json` contains (optionally) a path to the extension's icon file as well as text for the extension's display name, short summary, and path to the full description file - - `contributions/description-.md` contains a brief description of the extension in the language specified by `` +- `assets/` contains asset files the extension and its WebViews can retrieve using the `papi-extension:` protocol, as well as textual descriptions in various languages. It is copied into the build folder + - `assets/displayData.json` contains (optionally) a path to the extension's icon file as well as text for the extension's display name, short summary, and path to the full description file + - `assets/descriptions/` contains textual descriptions of the extension in various languages + - `assets/descriptions/description-.md` contains a brief description of the extension in the language specified by `` +- `contributions/` contains JSON files the platform uses to extend data structures for things like menus and settings. The JSON files are referenced from the manifest - `public/` contains other static files that are copied into the build folder - `dist/` is a generated folder containing the built extension files - `release/` is a generated folder containing a zip of the built extension files diff --git a/contributions/description-en.md b/assets/descriptions/description-en.md similarity index 100% rename from contributions/description-en.md rename to assets/descriptions/description-en.md diff --git a/contributions/displayData.json b/assets/displayData.json similarity index 75% rename from contributions/displayData.json rename to assets/displayData.json index 254963c..8fa745b 100644 --- a/contributions/displayData.json +++ b/assets/displayData.json @@ -4,7 +4,7 @@ "en": { "displayName": "Paranext Extension Template", "shortSummary": "Base template for a Paranext Extension", - "description": "./description-en.md" + "description": "assets/descriptions/description-en.md" } } } diff --git a/manifest.json b/manifest.json index 5739761..2c9c40b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "paranext-extension-template", "version": "0.0.1", - "displayData": "contributions/displayData.json", + "displayData": "assets/displayData.json", "author": "Paranext", "license": "MIT", "main": "src/main.ts",