Skip to content

build: cdn management.#1

Merged
knightedcodemonkey merged 6 commits intomainfrom
bananas
Mar 15, 2026
Merged

build: cdn management.#1
knightedcodemonkey merged 6 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 15, 2026 18:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the app to centralize CDN/module loading and introduces a build pipeline that can generate a production import map (via JSPM) or run in direct-CDN mode.

Changes:

  • Added src/cdn.js + src/bootstrap.js to manage CDN providers, fallbacks, and modulepreload behavior.
  • Updated src/app.js to import runtime modules via the new CDN loader with fallback support (including optional style compiler loading).
  • Added build scripts (scripts/build-prepare.js, scripts/build-importmap.js) and updated CI/deploy workflows to build dist.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/styles.css Quote/style normalization for consistency.
src/index.html Removes inline import map, switches entrypoint to bootstrap.js.
src/cdn.js New CDN provider registry + import candidate resolution + fallback importing.
src/bootstrap.js Adds modulepreload injection and bootstraps app.js.
src/app.js Migrates runtime imports to CDN loader + improves error surfacing for missing exports.
scripts/build-prepare.js Creates dist, injects runtime CDN selection, generates prod-imports.js.
scripts/build-importmap.js Runs jspm link to inject an import map (importMap mode only).
package.json / package-lock.json Adds build scripts + jspm; updates lint target and Prettier config.
docs/build-and-deploy.md Documents build modes and deployment approach.
.oxlintrc.json Enables import plugin and import rules; updates ignore patterns.
.gitignore Ignores dist/.
.github/workflows/ci.yml Adds npm run build to CI.
.github/workflows/deploy.yml Switches Pages artifact to dist and builds via build:esm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 15, 2026 18:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a centralized CDN resolution layer and a build pipeline that produces a dist/ output (optionally with a JSPM-generated import map), replacing the previous inline import map + direct CDN imports approach.

Changes:

  • Added a CDN provider abstraction (src/cdn.js) with primary/fallback resolution and runtime import helpers.
  • Added bootstrap.js + refactored app.js to load runtime modules via CDN fallback instead of hardcoded URLs / inline import maps.
  • Added build scripts/workflows to generate dist/ and (in import-map mode) run jspm link to inject an import map into dist/index.html.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/styles.css Quote/style normalization in CSS strings/selectors.
src/index.html Removes inline import map; switches entrypoint to bootstrap.js.
src/cdn.js New CDN provider/spec registry + URL/candidate resolution + fallback importing.
src/bootstrap.js Adds modulepreload generation (non-importMap mode) then loads app.js.
src/app.js Refactors runtime/compiler loading to use cdnImports + fallback importing.
scripts/build-prepare.js Creates dist/, generates prod-imports.js, injects primary CDN selection into HTML.
scripts/build-importmap.js Runs jspm link to inject an import map into dist/index.html (importMap mode only).
package.json / package-lock.json Adds build scripts and jspm devDependency; updates lint script scope.
docs/build-and-deploy.md New build/deploy documentation for the new pipeline/modes.
.oxlintrc.json Enables import plugin + rules; expands ignore patterns.
.gitignore Ignores dist/.
.github/workflows/deploy.yml Switches GitHub Pages deploy artifact to dist/ and adds build step.
.github/workflows/ci.yml Adds build step after lint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit 301ff0d into main Mar 15, 2026
1 check passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 15, 2026 19:27
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