feat: add Lume.js framework implementation#17
Merged
Conversation
…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
Contributor
Author
|
Hey @lissy93 Not sure what happened the PR got closed so i have opened it again. Thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/lume-js/)state(),bindDom(),computed(),repeat(), and theshowhandler from the Lume.js APIframeworks.jsonwith logo, description, and linksassets/styles/design-system.css(canonical shared CSS).github/README.md: logo grid, community stats table, and CI status tableAbout 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.Test plan
npm run lint:lume-jspasses (ESLint flat config, zero errors)