Skip to content

Rewrite in TypeScript and drop jQuery - #3

Open
D3ller wants to merge 10 commits into
intersel:mainfrom
D3ller:main
Open

Rewrite in TypeScript and drop jQuery#3
D3ller wants to merge 10 commits into
intersel:mainfrom
D3ller:main

Conversation

@D3ller

@D3ller D3ller commented Jul 1, 2026

Copy link
Copy Markdown
Contributor
  • Fully migrated to TypeScript: The core codebase and all demos have been rewritten in TypeScript, providing strict typing, better autocompletion, and a much safer developer experience (DX).
  • Dropped jQuery dependency: Completely removed all jQuery code in favor of modern, native JavaScript (Vanilla JS) for better performance and lighter codebase.
  • Zero-config bundling: Klapy.ts now bundles all its required dependencies directly out of the box. No need to manually import them anymore, it's plug-and-play!

D3ller and others added 10 commits March 11, 2026 23:03
…gration

Core:
- Make animation (Blapymotion) and websocket (BlapySocket) optional and
  auto-detected from separate standalone builds (dist/BlapyMotion.js,
  dist/BlapySocket.js) instead of being bundled in the core. Convert
  BlapySocket to TypeScript.
- TemplateManager: scope template resolution to direct-child templates
  (:scope >) so nested sub-block templates no longer leak/accumulate into
  parents; add null guards in generateHtml/addBlapyIndices; align with
  upstream Blapy v2.1.2.
- Move html-extension.d.ts and shared types under src/shared/types.

Build/dev:
- Add per-module vite configs and chain them in the build script.
- Add docker-compose dev env; fix websocket container crash-loop by
  installing ws from the demo's own package.json.

Demos:
- Fix helloworld (animation), demo_json_nested_blocks (jQuery .attr leftover),
  demo_json_init_with_mustache; migrate demos to the modern dist/blapy.umd.js;
  drop bundled lib/ vendor copies.
…yMotion.js/BlapySocket.js) instead of the removed blapy2.js
…rvice, renamed TemplateManager methods/signatures, real Mustache/json2html rendering)
…tale tests don't double/pollute the unit run
…no jQuery, optional BlapyMotion/BlapySocket, bundled deps)
@D3ller

D3ller commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Rewrote iFsm to kFSM in TypeScript: The module has been migrated, though there is still room for structural improvements. Extracting it into a standalone npm package would be ideal, but this is deferred for a future update due to time constraints.

@intersel intersel added enhancement New feature or request wontfix This will not be worked on labels Aug 27, 2026
@intersel

Copy link
Copy Markdown
Owner

The idea behind Blapy is to remain fully vanilla JavaScript and to have as few dependencies as possible. TypeScript would add another dependency, which is not desired.

Removing jQuery, however, would be a really good thing and would be very welcome.

@D3ller

D3ller commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

I’ve actually already removed jQuery, so Blapy is now fully vanilla JavaScript on that side.

Regarding TypeScript, it would only be a development dependency. The distributed package could still be plain JavaScript with no additional runtime dependency for users.

So it wouldn’t really go against the goal of keeping Blapy lightweight, although I understand if you want to keep the source itself dependency-free as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants