diff --git a/.github/workflows/chrome.yml b/.github/workflows/chrome-tests.yml
similarity index 78%
rename from .github/workflows/chrome.yml
rename to .github/workflows/chrome-tests.yml
index 74daad1..99eb81e 100644
--- a/.github/workflows/chrome.yml
+++ b/.github/workflows/chrome-tests.yml
@@ -1,6 +1,8 @@
name: Chrome Tests
-on: [push]
+on:
+ push:
+ workflow_call:
jobs:
cypress-ct:
@@ -15,8 +17,6 @@ jobs:
id: pnpm-install
with:
version: 8
- run_install: false
- - name: Install dependencies
- run: pnpm install
+ run_install: true
- name: Chrome tests
run: pnpm run test:chrome
diff --git a/.github/workflows/firefox.yml b/.github/workflows/firefox-tests.yml
similarity index 78%
rename from .github/workflows/firefox.yml
rename to .github/workflows/firefox-tests.yml
index cd05ed7..fe409da 100644
--- a/.github/workflows/firefox.yml
+++ b/.github/workflows/firefox-tests.yml
@@ -1,6 +1,8 @@
name: Firefox Tests
-on: [push]
+on:
+ push:
+ workflow_call:
jobs:
cypress-ct:
@@ -15,8 +17,6 @@ jobs:
id: pnpm-install
with:
version: 8
- run_install: false
- - name: Install dependencies
- run: pnpm install
+ run_install: true
- name: Firefox tests
run: pnpm run test:firefox
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..a13451a
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,37 @@
+name: Publish to NPM
+
+on:
+ push:
+ tags: ['v*']
+ workflow_dispatch:
+
+jobs:
+ chrome-tests:
+ uses: ./.github/workflows/chrome-tests.yml
+ firefox-tests:
+ uses: ./.github/workflows/firefox-tests.yml
+ publish:
+ needs: [chrome-tests, firefox-tests]
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ id-token: write
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '19.x'
+ registry-url: 'https://registry.npmjs.org'
+ - uses: pnpm/action-setup@v2
+ name: Install pnpm
+ with:
+ version: 8
+ run_install: true
+ - name: Build
+ run: pnpm build
+ - name: Pack
+ run: rm -rf *.tgz && npm pack
+ - name: Publish
+ run: npm publish *.tgz --provenance
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/webkit.yml b/.github/workflows/webkit.yml
deleted file mode 100644
index 9375827..0000000
--- a/.github/workflows/webkit.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Webkit Tests
-
-on: [push]
-
-jobs:
- cypress-ct:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: '18'
- - uses: pnpm/action-setup@v2
- name: Install pnpm
- id: pnpm-install
- with:
- version: 8
- run_install: false
- - name: Install dependencies
- run: pnpm install
- - name: Webkit tests
- run: pnpm run test:webkit
diff --git a/README.md b/README.md
index 8cf70e3..d1b9536 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-    
+    
# Vue Collapsed
@@ -14,10 +14,6 @@ Check out my other packages for Vue 3:
> _Fully-featured notification system for Vue and Nuxt._
> [Visit repo β ](https://github.com/smastrom/notivue)
-> π₯ **Vue Use Fixed Header**
-> _Turn your boring fixed header into a smart one with one line of code._
-> [Visit repo β ](https://github.com/smastrom/vue-use-fixed-header)
-
> π **Vue Use Active Scroll**
> _Accurate TOC/sidebar links without compromises._
> [Visit repo β ](https://github.com/smastrom/vue-use-active-scroll)
@@ -27,9 +23,10 @@ Check out my other packages for Vue 3:
## Installation
```shell
-npm i -S vue-collapsed
+npm i vue-collapsed
#Β yarn add vue-collapsed
# pnpm add vue-collapsed
+# bun add vue-collapsed
```
## Props
@@ -63,7 +60,7 @@ const isExpanded = ref(false)
This is a paragraph. {{ 'Collapsed '.repeat(100) }} This is a paragraph. {{ 'Collapsed '.repeat(100) }}
This is a paragraph.
+{{ 'Collapsed '.repeat(100) }}
This is a paragraph.
+{{ 'Collapsed '.repeat(100) }}