Skip to content

Commit

Permalink
refactor: adjusted file structure for extension descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyhammer committed Jul 2, 2024
1 parent 0df9c94 commit aecc3d1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down Expand Up @@ -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-<locale>.md` contains a brief description of the extension in the language specified by `<locale>`
- `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-<locale>.md` contains a brief description of the extension in the language specified by `<locale>`
- `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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion contributions/displayData.json → assets/displayData.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit aecc3d1

Please sign in to comment.