Skip to content

Commit

Permalink
add missing esm modules and help.html to reh-web (#6058)
Browse files Browse the repository at this point in the history
- addresses rstudio/rstudio-pro#7306
- adds help.html and external ESM modules to the reh-web build

### Release Notes

#### New Features

- N/A

#### Bug Fixes

- Fix issue preventing Positron from loading in Posit Workbench

### QA Notes

These files should no longer be missing, so Positron should now load in
Workbench.
<img width="236" alt="image"
src="https://github.com/user-attachments/assets/2142d440-58cb-4149-86fa-81b19b9da138"
/>

I also noticed that help.html was missing, which was preventing the Help
Pane from working. Opening Help for R and Python from a Console should
now work:

R Console
```r
?iris
```

Python Console
```python
?print
```

---------

Co-authored-by: sharon wang <[email protected]>
  • Loading branch information
2 people authored and jmcphers committed Jan 21, 2025
1 parent 7538cf6 commit df61a68
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build/gulpfile.reh.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
].map(resource => gulp.src(resource, { base: '.' }).pipe(rename(resource)));
}

const all = es.merge(
// --- Start Positron ---
let all = es.merge(
// --- End Positron ---
packageJsonStream,
productJsonStream,
license,
Expand All @@ -402,6 +404,14 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
...web
);

// --- Start Positron ---
if (type === 'reh-web') {
// External modules (React, etc.)
const moduleSources = gulp.src('src/esm-package-dependencies/**').pipe(rename(function (p) { p.dirname = path.join('out', 'esm-package-dependencies', p.dirname) }));
all = es.merge(all, moduleSources);
}
// --- End Positron ---

let result = all
.pipe(util.skipDirectories())
.pipe(util.fixWin32DirectoryPermissions());
Expand Down
4 changes: 4 additions & 0 deletions build/gulpfile.vscode.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const positronVersion = (quality && quality !== 'stable') ? `${product.positronV
// --- End Positron ---

const vscodeWebResourceIncludes = [
// --- Start Positron ---
// Positron Help
'out-build/vs/workbench/contrib/positronHelp/browser/resources/help.html',
// --- End Positron ---

// NLS
'out-build/nls.messages.js',
Expand Down

0 comments on commit df61a68

Please sign in to comment.