Skip to content

Commit 949415f

Browse files
committed
Update readmes
1 parent 9421dbf commit 949415f

File tree

3 files changed

+71
-58
lines changed

3 files changed

+71
-58
lines changed

.github/workflows/npm-publish.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '**.md'
9+
- 'docs/**'
10+
- '.gitignore'
11+
- 'LICENSE'
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build package
33+
run: npm run build
34+
35+
- name: Get current version
36+
id: package-version
37+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
38+
39+
- name: Check if version exists on npm
40+
id: check-version
41+
run: |
42+
if npm view esp-webflash-toolkit@${{ steps.package-version.outputs.version }} version 2>/dev/null; then
43+
echo "exists=true" >> $GITHUB_OUTPUT
44+
echo "Version ${{ steps.package-version.outputs.version }} already exists on npm"
45+
else
46+
echo "exists=false" >> $GITHUB_OUTPUT
47+
echo "Version ${{ steps.package-version.outputs.version }} is new"
48+
fi
49+
50+
- name: Publish to npm
51+
if: steps.check-version.outputs.exists == 'false'
52+
run: npm publish
53+
env:
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
56+
- name: Create git tag
57+
if: steps.check-version.outputs.exists == 'false'
58+
run: |
59+
git config user.name "github-actions[bot]"
60+
git config user.email "github-actions[bot]@users.noreply.github.com"
61+
git tag v${{ steps.package-version.outputs.version }}
62+
git push origin v${{ steps.package-version.outputs.version }}
63+
64+
- name: Skip publishing
65+
if: steps.check-version.outputs.exists == 'true'
66+
run: echo "Skipping publish - version ${{ steps.package-version.outputs.version }} already exists on npm"

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# ESP WebFlash Toolkit
22

3-
A browser-based toolkit built on [esptool-js](https://github.com/espressif/esptool-js) for flashing ESP32 devices with runtime-configurable firmware. Built around a [JavaScript implementation](./src/nvs-generator.js) of ESP-IDF's NVS partition format that lets you generate config binaries on the fly.
3+
[![npm version](https://img.shields.io/npm/v/esp-webflash-toolkit.svg)](https://www.npmjs.com/package/esp-webflash-toolkit)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
6+
A pure JavaScript implementation of ESP-IDF's NVS (Non-Volatile Storage) partition format that runs in a browser. This lets you generate ESP32 config binaries on the fly in a browser, then flash them to devices via Web Serial API - no build chain required.
47

58
---
69

7-
Traditional firmware distribution requires end users to install platform-specific tooling and run command-line procedures. Every configuration change means recompiling and reflashing the entire binary. We've taken a different approach: **flash precompiled firmware once, then manage configurations through NVS partitions generated in the browser**.
10+
Traditional firmware distribution requires end users to install platform-specific tooling and run command-line procedures. Every configuration change means recompiling and reflashing the entire binary. This takes a different approach: **flash precompiled firmware, then manage configurations through NVS partitions generated in the browser**.
811

912
This project implements the complete [ESP-IDF NVS binary format](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/storage/nvs_flash.html) in JavaScript, producing partitions that are byte-for-byte compatible with ESP-IDF. Your firmware reads them using standard NVS APIs without modifications. Unlike solutions like Improv Wi-Fi, this works with existing ESP-IDF projects out of the box.
1013

docs/README.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)