Skip to content

[DASH-2149] [templates] initialize javascript templates on production branch#100

Open
syd-shields wants to merge 4 commits into
productionfrom
sydshields/dash-2149-initialize-javascript-directory-on-production-templates
Open

[DASH-2149] [templates] initialize javascript templates on production branch#100
syd-shields wants to merge 4 commits into
productionfrom
sydshields/dash-2149-initialize-javascript-directory-on-production-templates

Conversation

@syd-shields
Copy link
Copy Markdown
Contributor

@syd-shields syd-shields commented Jun 2, 2026

Adds CI job that builds javascript templates to the production branch.


Note

Low Risk
Single default URL change in a fetch script; overrides via TEMPLATES_API_URL remain, with no auth or data-model changes.

Overview
Updates the default templates list URL used by fetch-playground-typescript-dirs.mjs when neither an explicit apiUrl nor TEMPLATES_API_URL is set: from https://www.browserbase.com/website-api/templates to https://www.browserbase.com/api/templates.

That endpoint feeds playground TypeScript template discovery (including init flows on production). Callers can still override via env or argument.

Reviewed by Cursor Bugbot for commit 6f78172. Bugbot is set up for automated code reviews on this repo. Configure here.

syd-shields and others added 4 commits May 13, 2026 11:40
…#75)

* init

* add a build step that turns new ts templates into js in CI

* add file filter to build script

* add built js templates

* add exclude flag

* add comments to explain build filters

* add build step to run on dev branch in CI

* regen templats on each pr merge

* include all readme, package json and env examples in build

* get paths to build js files first so that the entire repo isn't deleted and rewritten with new build

* remove built js files

* only build js files to production branch

* remove build javascript workflow

* before recursing, skip directories whose basename is in DEFAULT_EXCLUDED_DIRS

* before recursing, skip directories whose basename is in DEFAULT_EXCLUDED_DIRS

* if there are zero playground compatible templates, do not call build-javascript.mjs

* add test-production branch support

* build js templates

* remove built js files

* add pkg.type = module to adaptPackageJsonForJavaScript so it's unconditionally set for all generated JS templates

* consolidate workflows to one plauground.yml file to remove need to make updates to it twice

* write contents to test-production and production branches

* use hardcoded branch names instead of unused var

* add --no-verify flag to build

* add stripLeadingTscBuildCommand to handle when multiple commands exist alongside tsc

* add parseBuildOptions to parse CLI flags at once instead of in multiple places to prevent drift
@syd-shields syd-shields requested a review from a team as a code owner June 2, 2026 15:07
@syd-shields
Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@syd-shields syd-shields changed the title initialize javascript templates on production branch [DASH-2149] [templates] initialize javascript templates on production branch Jun 2, 2026
@syd-shields syd-shields changed the base branch from dev to production June 2, 2026 15:08
@syd-shields syd-shields changed the base branch from production to test-production June 2, 2026 15:11
@syd-shields syd-shields changed the base branch from test-production to production June 2, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants