From 030a57fb1e3044b3fe4c6bac438333826436526b Mon Sep 17 00:00:00 2001 From: rolfheij-sil Date: Thu, 7 Sep 2023 13:44:32 -0400 Subject: [PATCH] Rename types file --- README.md | 2 +- package.json | 2 +- .../{paranext-extension-template.d.ts => extension-types.ts} | 2 +- webpack/webpack.config.main.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/types/{paranext-extension-template.d.ts => extension-types.ts} (73%) diff --git a/README.md b/README.md index e2b390b..aa1be45 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This is a webpack project template pre-configured to build Paranext extensions. - `package.json` contains information about this extension's npm package. It is required for Paranext to use the extension properly. It is copied into the build folder - `src` contains the source code for the extension - `src/main.ts` is the main entry file for the extension - - `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 + - `src/types/extension-types.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) - `public` contains static files that are copied into the build folder diff --git a/package.json b/package.json index f7281b1..2ffd1b2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "version": "0.0.1", "main": "paranext-extension-template.js", - "types": "paranext-extension-template.d.ts", + "types": "extension-types.d.ts", "author": "Paranext", "license": "MIT", "scripts": { diff --git a/src/types/paranext-extension-template.d.ts b/src/types/extension-types.ts similarity index 73% rename from src/types/paranext-extension-template.d.ts rename to src/types/extension-types.ts index 73f948a..3c789e1 100644 --- a/src/types/paranext-extension-template.d.ts +++ b/src/types/extension-types.ts @@ -1,4 +1,4 @@ -declare module 'paranext-extension-template' { +declare module 'extension-types' { // Add extension types exposed on the papi for other extensions to use here // More instructions can be found in the README } diff --git a/webpack/webpack.config.main.ts b/webpack/webpack.config.main.ts index 22291f3..3b4a98d 100644 --- a/webpack/webpack.config.main.ts +++ b/webpack/webpack.config.main.ts @@ -52,7 +52,7 @@ const configMain: webpack.Configuration = merge(configBase, { // We want all files from the public folder copied into the output folder { from: 'public', to: './' }, // Copy this extension's type declaration file into the output folder - { from: 'src/types/paranext-extension-template.d.ts', to: './' }, + { from: 'src/types/extension-types.d.ts', to: './' }, // We need to distribute the package.json for Paranext to read the extension properly { from: 'package.json', to: './' }, ],