Skip to content

Commit 5c27eaf

Browse files
authored
Merge pull request #27 from swup/next
Update for swup 4
2 parents ce7d11a + 86fb9de commit 5c27eaf

8 files changed

+143
-575
lines changed

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Changelog
2+
3+
<!-- ## [Unreleased] -->
4+
5+
## [3.0.0] - 2023-07-26
6+
7+
- Finish animation by default
8+
- Update for swup 4 compatibility
9+
10+
## [2.0.0] - 2023-03-10
11+
12+
- Switch to microbundle
13+
- Export native ESM module
14+
15+
## [1.2.0] - 2022-08-01
16+
17+
- Ensure width never exceeds 100%
18+
- Initialise with random value to improve appearance
19+
- Improve initial transition by forcing reflow
20+
21+
## [1.1.0] - 2022-03-08
22+
23+
- Finish the animation before hiding the progress bar
24+
25+
## [1.0.0] - 2020-08-10
26+
27+
- Initial release
28+
29+
[Unreleased]: https://github.com/swup/progress-plugin/compare/3.0.0...HEAD
30+
31+
[3.0.0]: https://github.com/swup/progress-plugin/releases/tag/3.0.0
32+
[2.0.0]: https://github.com/swup/progress-plugin/releases/tag/2.0.0
33+
[1.2.0]: https://github.com/swup/progress-plugin/releases/tag/1.2.0
34+
[1.1.0]: https://github.com/swup/progress-plugin/releases/tag/1.1.0
35+
[1.0.0]: https://github.com/swup/progress-plugin/releases/tag/1.0.0

readme.md README.md

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# Swup Progress Bar Plugin
22

3-
This [swup](https://github.com/swup/swup) plugin will display a progress bar for
4-
all requests taking longer than ~300ms.
3+
A [swup](https://swup.js.org) plugin for displaying a progress bar.
4+
5+
Shows a loading indicator for requests taking longer than ~300ms.
6+
57

68
## Installation
79

8-
This plugin can be installed with npm
10+
Install the plugin from npm and import it into your bundle.
911

1012
```bash
1113
npm install @swup/progress-plugin
1214
```
1315

14-
and included with import
15-
16-
```shell
16+
```js
1717
import SwupProgressPlugin from '@swup/progress-plugin';
1818
```
1919

20-
or included from the dist folder
20+
Or include the minified production file from a CDN:
2121

2222
```html
23-
<script src="./dist/SwupProgressPlugin.js"></script>
23+
<script src="https://unpkg.com/@swup/progress-plugin@3"></script>
2424
```
2525

2626
## Usage
@@ -52,7 +52,7 @@ The progress bar has a class name of `swup-progress-bar` you can use for styling
5252
transition: 300,
5353
delay: 300,
5454
initialValue: 0.25,
55-
hideImmediately: true
55+
finishAnimation: true
5656
}
5757
```
5858

@@ -62,7 +62,7 @@ Class name to use for the container div.
6262

6363
### transition
6464

65-
Length of CSS transition between loading states, in milliseconds.
65+
Length of the CSS transition between loading states, in milliseconds.
6666

6767
### delay
6868

@@ -76,8 +76,6 @@ To create a slightly more "realistic" appearance, the progress bar will start
7676
out at a random position beteen 0 and the value of this option. Set to `0` to
7777
always start from the left.
7878

79-
### hideImmediately
80-
81-
Whether the progress bar is hidden instantly after a page visit.
79+
### finishAnimation
8280

83-
Set to `false` to always complete the transition to `width: 100%` before hiding it.
81+
Whether the progress bar will complete the transition to 100% before hiding.

0 commit comments

Comments
 (0)