From 80e4dc3242514e302f5ce159825f7d5d5f8ecb77 Mon Sep 17 00:00:00 2001 From: abeidahmed Date: Thu, 23 Oct 2025 18:29:04 +0400 Subject: [PATCH 1/2] chore: update README --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b06ed37..092ccd5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,57 @@ # Impulse -A JavaScript framework that leverages the Web Components API. +A lightweight JavaScript framework that leverages the Web Components API. Unlike traditional frameworks, Impulse doesn't +dictate how you render HTML. Instead, it's designed to augment your existing HTML with just the right amount of +JavaScript to make it interactive and reactive. + +Write your HTML however you like, and let Impulse handle the behavior. + +## Installation + +```bash +yarn add @ambiki/impulse +``` + +## Example: Simple counter + +```ts +import { ImpulseElement, property, registerElement, target } from '@ambiki/impulse'; + +@registerElement('counter-element') +export default class CounterElement extends ImpulseElement { + @property({ type: Number }) count = 0; + @target() output: HTMLElement; + + countChanged(newValue: number) { + this.output.textContent = String(newValue); + } + + decrement() { + this.count--; + } + + increment() { + this.count++; + } +} +``` + +HTML: + +```html + +

Count: 0

+ + +
+``` + +The counter automatically syncs the `count` attribute with the component property, calling `countChanged()` whenever it +updates. No virtual DOM, no JSX - just progressive enhancement of your HTML. + +## Learn more + +Check out the [full documentation](https://ambiki.github.io/impulse/) to explore more. ## License From 9c98066cef3e4e97f1104ebe51758a2a9d28b3d1 Mon Sep 17 00:00:00 2001 From: abeidahmed Date: Thu, 23 Oct 2025 18:32:59 +0400 Subject: [PATCH 2/2] chore: copy readme before publishing --- packages/core/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 9cf13de..0cdaedd 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -32,7 +32,8 @@ } }, "files": [ - "dist" + "dist", + "README.md" ], "keywords": [ "web-components" @@ -41,7 +42,7 @@ "build": "rollup --config rollup.config.js", "build:watch": "rollup --config rollup.config.js --watch", "clean": "rm -fr dist", - "prepublishOnly": "yarn clean && yarn build", + "prepublishOnly": "cp ../../README.md . && yarn clean && yarn build", "test": "web-test-runner", "test:watch": "web-test-runner --watch" },