Skip to content

Commit d075221

Browse files
authored
Merge pull request #1 from swup/next
Update for swup 4
2 parents 85bbc6d + 233d85f commit d075221

16 files changed

+5602
-6587
lines changed

.github/ISSUE_TEMPLATE/issue-template.md

-22
This file was deleted.

.github/workflows/npm-publish.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
publish-npm:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v1
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 12
17-
registry-url: https://registry.npmjs.org/
16+
node-version: 16
17+
registry-url: https://registry.npmjs.org
1818
- run: npm ci
1919
- run: npm publish --access public
2020
env:

.github/workflows/version-update.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow bumps the package.json version and creates a PR
2+
3+
name: Update package version
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
segment:
9+
description: 'Semver segment to update'
10+
required: true
11+
default: 'patch'
12+
type: choice
13+
options:
14+
- minor
15+
- patch
16+
17+
jobs:
18+
update-version:
19+
name: Update package version
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v2
24+
with:
25+
node-version: 16
26+
- run: echo "Updating ${{ inputs.segment }} version"
27+
- name: Update version
28+
run: npm --no-git-tag-version version ${{ inputs.segment }}
29+
- uses: peter-evans/create-pull-request@v4
30+
with:
31+
base: 'master'
32+
branch: 'version/automated'
33+
title: 'Update package version (automated)'
34+
commit-message: 'Update package version'
35+
body: 'Automated update to ${{ inputs.segment }} version'

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ wiki-wishlist
1313
*.sublime-workspace
1414
.editorconfig
1515
.idea
16-
lib
17-
/plugins
16+
/dist
1817
.vscode/*
1918
!.vscode/settings.json
2019
!.vscode/tasks.json

.npmignore

-16
This file was deleted.

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
<!-- ## [Unreleased] -->
4+
5+
## [2.0.0] - 2023-07-26
6+
7+
- Switch to microbundle
8+
- Export native ESM module
9+
- Update for swup 4 compatibility
10+
- Include query params in location key
11+
12+
## [1.0.0] - 2021-06-07
13+
14+
- Initial release
15+
16+
[Unreleased]: https://github.com/swup/livewire-plugin/compare/2.0.0...HEAD
17+
18+
[2.0.0]: https://github.com/swup/livewire-plugin/releases/tag/2.0.0
19+
[1.0.0]: https://github.com/swup/livewire-plugin/releases/tag/1.0.0

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Swup Livewire Plugin
2+
3+
A [swup](https://swup.js.org) plugin for integrating [Laravel Livewire](https://laravel-livewire.com/).
4+
5+
Re-initialize Livewire components after each page change.
6+
7+
## Installation
8+
9+
Install the plugin from npm and import it into your bundle.
10+
11+
```bash
12+
npm install @swup/livewire-plugin
13+
```
14+
15+
```js
16+
import SwupLivewirePlugin from '@swup/livewire-plugin';
17+
```
18+
19+
Or include the minified production file from a CDN:
20+
21+
```html
22+
<script src="https://unpkg.com/@swup/livewire-plugin@2"></script>
23+
```
24+
25+
## Usage
26+
27+
To run this plugin, include an instance in the swup options.
28+
29+
```javascript
30+
const swup = new Swup({
31+
plugins: [new SwupLivewirePlugin()]
32+
});
33+
```

0 commit comments

Comments
 (0)