mirror of
https://github.com/acamarata/nrel-spa.git
synced 2026-07-01 03:14:26 +00:00
Complete modernization of the package. The core SPA algorithm is unchanged and validated; everything else is rebuilt to match current JavaScript ecosystem standards. Changes: - TypeScript wrapper in src/ with full type definitions - Dual CJS/ESM build via tsup (dist/index.cjs, dist/index.mjs) - Core algorithm moved from dist/spa.js to lib/spa.js (same code) - Input validation with descriptive TypeError/RangeError messages - formatTime() and SPA function code constants as named exports - getSpa() / calcSpa() accept null for optional args (tz, options) - Test suite: 61 ESM assertions and 17 CJS assertions - GitHub Actions CI: Node 20/22/24 matrix, typecheck, pack-check - GitHub Wiki: Home, API Reference, Architecture, Twilight, NREL SPA - NREL attribution in LICENSE and README per their license terms - package.json: exports map, files, engines >=20, sideEffects: false - Author corrected to Aric Camarata; repository.url uses git+https:// - LICENSE year corrected to 2023-2026 - Removed: index.js, test.js, dist/spa.js (superseded by above)
36 lines
835 B
YAML
36 lines
835 B
YAML
name: Sync Wiki
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ['.wiki/**']
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Checkout wiki
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ${{ github.repository }}.wiki
|
|
path: .wiki-remote
|
|
|
|
- name: Sync wiki pages
|
|
run: |
|
|
cp .wiki/*.md .wiki-remote/
|
|
cd .wiki-remote
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add -A
|
|
if git diff --cached --quiet; then
|
|
echo "No wiki changes to commit"
|
|
else
|
|
git commit -m "Sync wiki from repo"
|
|
git push
|
|
fi
|