Skip to content

Commit

Permalink
Add menu JSON to the manifest file (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyonsil authored Feb 9, 2024
2 parents b196e76 + 01d6f8c commit 44d449c
Show file tree
Hide file tree
Showing 25 changed files with 93,621 additions and 83 deletions.
1 change: 1 addition & 0 deletions extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This is a webpack project configured to build Paranext's official extensions inc
- `*.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 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 zips of the built extension files
Expand Down
2 changes: 1 addition & 1 deletion extensions/lib/git.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const errorStringTemplates = {
multiRemoteExists: 'remote {MULTI_TEMPLATE_NAME} already exists',
singleRemoteExists: 'remote {SINGLE_TEMPLATE_NAME} already exists',
/** `{0} is the subtree name aka the OS-independent extension directory path */
subtreeNeverAdded: "fatal: can't squash-merge: '{0}' was never added.\n",
subtreeNeverAdded: "can't squash-merge: '{0}' was never added.\n",
};

/** Object mapping const names for template replacing */
Expand Down
1 change: 1 addition & 0 deletions extensions/lib/update-from-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { ExtensionInfo, getExtensions, subtreeRootFolder } from '../webpack/webp
if (
e
.toString()
.toLowerCase()
.includes(ERROR_STRINGS.subtreeNeverAdded.replace('{0}', ext.dirPathOSIndependent))
)
// If this folder isn't a subtree, it may be intentionally not based on the template. Continue
Expand Down
128 changes: 64 additions & 64 deletions extensions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extensions/src/hello-someone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The general file structure is as follows:
- `*.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 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
17 changes: 17 additions & 0 deletions extensions/src/hello-someone/contributions/menus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"mainMenu": {
"columns": {},
"groups": {},
"items": []
},
"defaultWebViewTopMenu": {
"columns": {},
"groups": {},
"items": []
},
"defaultWebViewContextMenu": {
"groups": {},
"items": []
},
"webViewMenus": {}
}
Loading

0 comments on commit 44d449c

Please sign in to comment.