Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

- name: Lint
run: bun run lint

- name: Build
run: bun run build

- name: Check package can be published
run: bun pm pack --dry-run
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to NPM

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

- name: Lint
run: bun run lint

- name: Build
run: bun run build

- name: Publish to NPM
run: bun publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# dependencies (bun install)
node_modules
package-lock.json

# output
out
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# elysia-htmx
# @zeroaurora/elysia-htmx

Make it easier to use HTMX headers with Elysia.

## Installation

```bash
npm install @zeroaurora/elysia-htmx
```

## Usage

Refer to `example/` for now. Full docs coming later!

## Publishing

This package is automatically published to npm as `@zeroaurora/elysia-htmx` when a new release is created on GitHub. The publishing workflow will:

1. Install dependencies
2. Run linting checks
3. Build the package
4. Publish to npm

## License

MIT
27 changes: 25 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
{
"name": "elysia-htmx",
"name": "@zeroaurora/elysia-htmx",
"type": "module",
"version": "0.1.1",
"description": "Make it easier to use HTMX headers with Elysia",
"author": "ZeroAurora",
"license": "MIT",
"homepage": "https://github.com/ZeroAurora/elysia-htmx",
"repository": {
"type": "git",
"url": "https://github.com/ZeroAurora/elysia-htmx.git"
},
"bugs": {
"url": "https://github.com/ZeroAurora/elysia-htmx/issues"
},
"keywords": ["elysia", "htmx", "typescript", "web", "framework"],
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"LICENSE",
"README.md",
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup",
"lint": "eslint",
"lint:fix": "eslint --fix"
"lint:fix": "eslint --fix",
"prepublishOnly": "bun run build"
},
"peerDependencies": {
"@elysiajs/html": ">=1.4.0 <2.0.0",
Expand Down