Skip to content

Commit a018dc0

Browse files
committed
Update package dependencies and enhance README documentation
- Bump `fast-xml-parser` version to `5.3.4` in `package.json` and `package-lock.json`. - Upgrade `lockfileVersion` in `package-lock.json` to `3`. - Improve README to clarify the role of `package.json` and `package-lock.json`, and add details about the new `test-data/` directory for sample interlinear XML. - Add comments in `src/main.ts` and `src/interlinearizer.web-view.tsx` for better code documentation.
1 parent 8062745 commit a018dc0

File tree

6 files changed

+6724
-16983
lines changed

6 files changed

+6724
-16983
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,22 @@ Note: if you [update this extension from the template](#to-update-this-extension
9090

9191
The general file structure for an extension is as follows:
9292

93-
- `package.json` contains information about this extension's npm package. It is required for Platform.Bible to use the extension properly. It is copied into the build folder
93+
- `package.json` (and `package-lock.json`) contain information about this extension's npm package and lockfile. They are required for Platform.Bible to use the extension properly. The built extension is copied into the build folder
9494
- `manifest.json` is the manifest file that defines the extension and important properties for Platform.Bible. It is copied into the build folder
9595
- `src/` contains the source code for the extension
96-
- `src/main.ts` is the main entry file for the extension
96+
- `src/main.ts` is the main entry file for the extension (registers commands and wires interlinear XML)
9797
- `src/types/interlinearizer.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
98+
- `src/parsers/interlinearXmlParser.ts` parses interlinear XML into structured data (uses fast-xml-parser)
9899
- `*.web-view.tsx` files will be treated as React WebViews
100+
- `*.web-view.scss` files provide styles for WebViews
99101
- `*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality)
100102
- `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
101103
- `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
102104
- `assets/descriptions/` contains textual descriptions of the extension in various languages
103105
- `assets/descriptions/description-<locale>.md` contains a brief description of the extension in the language specified by `<locale>`
104106
- `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
105107
- `public/` contains other static files that are copied into the build folder
108+
- `test-data/` contains sample interlinear XML (e.g. `Interlinear_en_MAT.xml`) for development and tests
106109
- `.github/` contains files to facilitate integration with GitHub
107110
- `.github/workflows` contains [GitHub Actions](https://github.com/features/actions) workflows for automating various processes in this repo
108111
- `.github/assets/release-body.md` combined with a generated changelog becomes the body of [releases published using GitHub Actions](#publishing)
@@ -155,7 +158,6 @@ These steps will walk you through releasing a version on GitHub and bumping the
155158
1. Make sure the versions in this repo are on the version number you want to release. If they are not, manually dispatch the [Bump Versions workflow](#bumping-version-without-publishing-a-release) or run the `bump-versions` npm script to set the versions to what you want to release on the branch you want to release from.
156159

157160
2. Manually dispatch the Publish workflow in GitHub Actions targeting the branch you want to release from. This workflow creates a new pre-release for the version you intend to release and creates a new `bump-versions-<next_version>` branch to bump the version after the release so future changes apply to a new in-progress version instead of to the already released version. This workflow has the following inputs:
158-
159161
- `version`: Enter the version you intend to publish (e.g. 0.2.0). This is simply for verification to make sure you release the code that you intend to release. It is compared to the version in the code, and the workflow will fail if they do not match.
160162
- `newVersionAfterPublishing`: Enter the version you want to bump to after releasing (e.g. 0.3.0-alpha.0). Future changes will apply to this new version instead of to the version that was already released. Leave blank if you don't want to bump.
161163
- `bumpRef`: Enter the Git ref you want to create the bump versions branch from, e.g. `main`. Leave blank if you want to use the branch selected for the workflow run. For example, if you release from a stable branch named `release-prep`, you may want to bump the version on `main` so future development work happens on the new version, then you can rebase `release-prep` onto `main` when you are ready to start preparing the next stable release.

0 commit comments

Comments
 (0)