Skip to content

feat: add Lume.js framework implementation#17

Merged
lissy93 merged 9 commits into
lissy93:mainfrom
sathvikc:main
May 18, 2026
Merged

feat: add Lume.js framework implementation#17
lissy93 merged 9 commits into
lissy93:mainfrom
sathvikc:main

Conversation

@sathvikc
Copy link
Copy Markdown
Contributor

Summary

  • Adds a complete Lume.js implementation of the weather app (apps/lume-js/)
  • Loads Lume.js v2.2.1 from CDN — no build step required (same philosophy as Alpine.js)
  • Uses state(), bindDom(), computed(), repeat(), and the show handler from the Lume.js API
  • All 22 Playwright tests pass against the CDN build
  • Added Lume.js entry to frameworks.json with logo, description, and links
  • Added dark mode support to assets/styles/design-system.css (canonical shared CSS)
  • Updated .github/README.md: logo grid, community stats table, and CI status table

About Lume.js

Lume.js is a lightweight reactive library (~5.58 KB full gzipped) with no build step. It is HTML-first like Alpine.js but uses a flat reactive store model (state() + bindDom()) rather than inline directives — making it closer to vanilla JS in mental model.

Bundle: Single <script defer> tag from jsDelivr CDN — no npm install, no Vite, no bundler.

<script defer src="https://cdn.jsdelivr.net/npm/lume-js@2.2.1/dist/lume.global.js"></script>
const { state, bindDom, computed, repeat, show } = window.Lume;

Test plan

  • 22/22 Playwright E2E tests passing locally
  • npm run lint:lume-js passes (ESLint flat config, zero errors)
  • CDN URL resolves (HTTP 200, lume-js@2.2.1 on jsDelivr)
  • Dark mode renders correctly via shared CSS variable overrides
  • App loads and functions: search, current weather, 7-day forecast, localStorage persistence

sathvikc added 9 commits May 18, 2026 09:14
…vements

- index.html: switch from local file to CDN lume-js@2.1.0 global build
- index.html: add OG meta tags (og:title, og:description, og:type, og:url)
- js/: split monolithic weather-app.js into three files:
    app.js (state + bindDom + repeat + init logic, ~160 LOC)
    weather-utils.js (pure static helpers, extracted)
    weather-service.js (WeatherService class, extracted)
  Cyclomatic complexity: 70 → 22.3 avg; Maintainability: 4.8 → 31.1
- eslint.config.js: add ESLint flat config with browser globals
- package.json: add lint script and eslint devDependency
- README.md: replace stale ESM CDN import with all three supported
  patterns (npm, CDN ESM, CDN Global IIFE)
- assets/styles/design-system.css: add dark mode via
  @media (prefers-color-scheme: dark) overriding all semantic tokens
- frameworks.json: add logo URL and update bundle size description

Playwright: 22/22 passing against v2.1.0 CDN build
…om handler and computed

- Replace custom classNameHandler with stringAttr('class') — built-in handler
  that sets el.className via data-class attribute, no custom code needed
- Replace computed().subscribe() pattern with effect() for derived showWeather
  state — simpler, auto-tracked, idiomatic for writing back to store
- Update data-classname attr to data-class in index.html to match stringAttr pattern
- Update README to document corrected patterns
Lume defines state in JS (state()) and binds HTML as a plain view via
data-bind — identical architecture to Knockout. Alpine is the opposite:
state lives inline in HTML (x-data). Updated README and PR description.
- Add braces to all single-statement if blocks for consistency
- Remove trailing commas from object/array literals
- Add explanatory comments to empty catch blocks
- Improve error message clarity in geolocation rejection
@sathvikc
Copy link
Copy Markdown
Contributor Author

Hey @lissy93 Not sure what happened the PR got closed so i have opened it again. Thank you

Copy link
Copy Markdown
Owner

@lissy93 lissy93 left a comment

Choose a reason for hiding this comment

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

Looks good :)

@lissy93 lissy93 merged commit 8e44d7f into lissy93:main May 18, 2026
29 of 33 checks passed
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