afv-library/samples/README.md

44 lines
2.4 KiB
Markdown
Raw Normal View History

2026-02-28 04:56:57 +08:00
# Samples
Sample apps and templates synced into this repo for reference and reuse.
## webapp-template-app-react-sample-b2e-experimental
2026-03-03 04:05:26 +08:00
Source is synced from the npm package [@salesforce/webapp-template-app-react-sample-b2e-experimental](https://www.npmjs.com/package/@salesforce/webapp-template-app-react-sample-b2e-experimental). Only the package's source (no `node_modules`) is copied into `samples/webapp-template-app-react-sample-b2e-experimental/`.
2026-02-28 04:56:57 +08:00
2026-03-03 04:05:26 +08:00
### How it's updated
2026-02-28 04:56:57 +08:00
2026-03-03 04:05:26 +08:00
- **GitHub Action**: Runs nightly and can be triggered manually from the **Actions** tab ("Sync React samples from npm"). The workflow runs the same steps as below and opens a PR against `main` only when the npm package version has changed.
2026-02-28 04:56:57 +08:00
- **Local**: From the **repo root** you can run the same sync anytime:
```bash
npm install
npm run sync-react-b2e-sample
```
This installs the package into root `node_modules` and copies its source into `samples/webapp-template-app-react-sample-b2e-experimental/`, and updates `.version` in that folder.
### Version tracking
The file `samples/webapp-template-app-react-sample-b2e-experimental/.version` stores the last-synced npm version. The Action compares it to the latest on npm and only creates a PR when they differ.
2026-03-03 04:05:26 +08:00
## webapp-template-app-react-sample-b2x-experimental
Source is synced from the npm package [@salesforce/webapp-template-app-react-sample-b2x-experimental](https://www.npmjs.com/package/@salesforce/webapp-template-app-react-sample-b2x-experimental). Only the package's source (no `node_modules`) is copied into `samples/webapp-template-app-react-sample-b2x-experimental/`.
### How it's updated
- **GitHub Action**: Runs nightly and can be triggered manually from the **Actions** tab ("Sync React samples from npm"). The workflow runs the same steps as below and opens a PR against `main` only when the npm package version has changed.
- **Local**: From the **repo root** you can run the same sync anytime:
```bash
npm install
npm run sync-react-b2x-sample
```
This installs the package into root `node_modules` and copies its source into `samples/webapp-template-app-react-sample-b2x-experimental/`, and updates `.version` in that folder.
### Version tracking
The file `samples/webapp-template-app-react-sample-b2x-experimental/.version` stores the last-synced npm version. The Action compares it to the latest on npm and only creates a PR when they differ.