reveal-sdk
v2.1.0
Published
This project compiles and bundles the Reveal SDK into `reveal-sdk.js` (IIFE) and `reveal-sdk.esm.js` (ESM), then copies the output to `Web/GeneratedJavaScript/` for consumption by the ASP.NET samples and other web projects.
Downloads
2,103
Readme
Reveal TypeScript SDK Build
This project compiles and bundles the Reveal SDK into reveal-sdk.js (IIFE) and reveal-sdk.esm.js (ESM), then copies the output to Web/GeneratedJavaScript/ for consumption by the ASP.NET samples and other web projects.
How it fits into the build pipeline
The C# translator emits TypeScript files into each project's bin/ folder. This project picks those up, compiles them with tsc, bundles with rollup, and copies the result to Web/GeneratedJavaScript/. The ASP.NET sample (Web/AspNetCoreSdk/Sample.AspNetCore) then copies from GeneratedJavaScript/ into its wwwroot/Reveal/ folder via the CopyGeneratedJS MSBuild target on every build.
Full build order
Run these steps whenever translator source (C# Translated/ files) has changed or when the TS Source in src has changed.
1. Clean translator bins and GeneratedJavaScript
npm run clean-translator-binsDiscovers and removes the translator's TypeScript output from every contributing project's bin/ folder and wipes Web/GeneratedJavaScript/. This ensures no stale files carry over into the next build.
2. Build the C# translation projects in Visual Studio
Build the following projects:
Reveal.UI.Sdk.TS
This re-runs the translator and regenerates the TypeScript output in each project's bin/ folder.
3. Install dependencies (only when dependencies change)
npm installOnly required when package.json dependencies have been modified (e.g. a new package was added). Skip this step on routine builds.
4. Build the SDK bundle
npm run buildThis runs three steps in sequence:
compile— runs the gulp preprocessing pipeline (copies translator output frombin/folders intoreveal-src/src/) then compiles withtscbundle— bundles with rollup intodist/reveal-sdk.jsanddist/reveal-sdk.esm.jsfinalize— copies the bundle and locale files toWeb/GeneratedJavaScript/
5. Build Sample.AspNetCore
Build the Web/AspNetCoreSdk/Sample.AspNetCore project in Visual Studio. The CopyGeneratedJS MSBuild target runs automatically and copies the updated files from Web/GeneratedJavaScript/ into wwwroot/Reveal/.
Other useful scripts
| Script | Description |
|--------|-------------|
| npm run build:prod | Same as build but minifies the output |
| npm run clean | Removes dist/, compiled intermediate folders, and GeneratedJavaScript bundle files |
| npm run clean:full | Same as clean plus removes node_modules |
| npm run clean-translator-bins | Removes translator bin/ output and GeneratedJavaScript |
