diff --git a/README.md b/README.md index 50ff503..e48da8d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/contributions/menus.json b/contributions/menus.json new file mode 100644 index 0000000..f68441d --- /dev/null +++ b/contributions/menus.json @@ -0,0 +1,17 @@ +{ + "mainMenu": { + "columns": {}, + "groups": {}, + "items": [] + }, + "defaultWebViewTopMenu": { + "columns": {}, + "groups": {}, + "items": [] + }, + "defaultWebViewContextMenu": { + "groups": {}, + "items": [] + }, + "webViewMenus": {} +} diff --git a/manifest.json b/manifest.json index 92ba8bb..79a949c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,5 +6,6 @@ "license": "MIT", "main": "src/main.ts", "types": "src/types/paranext-extension-template.d.ts", + "menus": "contributions/menus.json", "activationEvents": [] } diff --git a/webpack/webpack.config.main.ts b/webpack/webpack.config.main.ts index c61b478..5a25bc6 100644 --- a/webpack/webpack.config.main.ts +++ b/webpack/webpack.config.main.ts @@ -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