Skip to content

Commit

Permalink
Migrate to svelte 5 (#41)
Browse files Browse the repository at this point in the history
* Migrate to svelte 5

* update README.md / hacs.json
  • Loading branch information
Alia5 committed Sep 26, 2024
1 parent ee3a331 commit 9b504dc
Show file tree
Hide file tree
Showing 21 changed files with 4,569 additions and 9,360 deletions.
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

235 changes: 0 additions & 235 deletions .eslintrc.cjs

This file was deleted.

33 changes: 24 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: workflow_dispatch
on: [workflow_dispatch, push]

defaults:
run:
Expand All @@ -10,12 +10,27 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm i
- run: npm run build
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: expander-card
path: |
dist
40 changes: 15 additions & 25 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
- name: Setup NodeJs
uses: actions/setup-node@v3
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '17'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Install Dependencies
run: npm install

- name: Set app version (Unix)
run: npm version ${{ github.event.inputs.release_version }} --no-git-tag-version
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- name: Build Project
run: npm run build
- name: Build
run: pnpm run build

- name: "Create Github release (full)"
if: ${{ !contains( github.event.inputs.release_version, '-rc' ) }}
Expand All @@ -56,7 +46,7 @@ jobs:
target_commitish: "master"
draft: false
prerelease: false
files: public/expander-card.js
files: dist/lovelace-expander-card.js
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ node_modules
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/public
/dist
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ https://github.com/Alia5/lovelace-expander-card
### Manual
#### 1. Download the card

Install the `expander-card` card by copying `expander-card.js` to `<config directory>/www/expander-card.js`
Install the `expander-card` card by copying `lovelace-expander-card.js` to `<config directory>/www/lovelace-expander-card.js`

Bash:

```bash
wget https://github.com/Alia5/lovelace-expander-card/releases/download/latest/expander-card.js
mv expander-card.js /config/www/
wget https://github.com/Alia5/lovelace-expander-card/releases/download/latest/lovelace-expander-card.js
mv lovelace-expander-card.js /config/www/
```

#### 2. Link the card to your lovelace ui
Expand All @@ -87,7 +87,7 @@ Link `expander-card` inside your `ui-lovelace.yaml`

```yaml
resources:
- url: /local/expander-card.js
- url: /local/lovelace-expander-card.js
type: js
```
Expand Down
Loading

0 comments on commit 9b504dc

Please sign in to comment.