Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contributions folder for menus.json #60

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,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 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": {}
}
1 change: 1 addition & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"license": "MIT",
"main": "src/main.ts",
"types": "src/types/paranext-extension-template.d.ts",
"menus": "contributions/menus.json",
"activationEvents": []
}
2 changes: 2 additions & 0 deletions webpack/webpack.config.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const configMain: webpack.Configuration = merge(configBase, {
{ from: 'public', to: './', noErrorOnMissing: true },
// We want all files from the assets folder copied into the output folder under assets
{ from: 'assets', to: './assets/', noErrorOnMissing: true },
// We want all files from the contributions folder copied into the output folder under contributions
{ from: 'contributions', to: './contributions/', noErrorOnMissing: true },
// Copy this extension's type declaration file into the output folder under src/types
{ from: 'src/types', to: './src/types', noErrorOnMissing: true },
// We need to distribute the package.json for Platform.Bible to read the extension properly
Expand Down
Loading