Skip to content

Commit b9f5cfc

Browse files
committed
Merge branch 'master' into development
# Conflicts: # README.md
2 parents bd7d38c + d326cd0 commit b9f5cfc

File tree

5 files changed

+49
-40
lines changed

5 files changed

+49
-40
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ An automatic web page progress bar.
77
### [Demo](https://codebyzach.github.io/pace/)
88
### [Documentation](https://codebyzach.github.io/pace/docs/)
99

10-
Include [pace.js](https://raw.github.com/CodeByZach/pace/master/pace.min.js) and the
10+
Include [pace.js](https://cdn.jsdelivr.net/npm/pace-js@latest/pace.min.js) and the
1111
[theme](https://codebyzach.github.io/pace/) css of your choice on your page
1212
(as early as is possible), and you're done!
1313

1414
Pace will automatically monitor your ajax requests, event loop lag, document
15-
ready state, and elements on your page to decide the progress. On ajax navigation
15+
ready state, and elements on your page to decide the progress. On ajax navigation
1616
it will begin again!
1717

1818
If you use AMD or Browserify, require pace.js and call `pace.start()` as early in the loading process as is possible.
@@ -50,7 +50,7 @@ paceOptions = {
5050
You can also put options on the script tag:
5151

5252
```html
53-
<script data-pace-options='{ "ajax": false }' src='pace.js'></script>
53+
<script data-pace-options='{ "ajax": false }' src="https://cdn.jsdelivr.net/npm/pace-js@latest/pace.min.js"></script>
5454
```
5555

5656
If you're using AMD or Browserify, you can pass your options to `start`:
@@ -67,7 +67,7 @@ Themes
6767
------
6868

6969
Pace includes a bunch of [themes](https://codebyzach.github.io/pace/)
70-
to get you started. Just include the appropriate css file. Send us a PR with
70+
to get you started. Just include the appropriate css file. Send us a PR with
7171
any interesting themes you create.
7272

7373
If you have minor styling changes and don't want to extend theme css, you can add custom class names to
@@ -82,7 +82,7 @@ paceOptions = {
8282
Collectors
8383
----------
8484

85-
Collectors are the bits of code which gather progress information. Pace includes four default collectors:
85+
Collectors are the bits of code which gather progress information. Pace includes four default collectors:
8686

8787
- Ajax
8888

@@ -113,17 +113,17 @@ paceOptions = {
113113
};
114114
```
115115

116-
Add your own classes to `paceOptions.extraSources` to add more sources. Each source should either
116+
Add your own classes to `paceOptions.extraSources` to add more sources. Each source should either
117117
have a `.progress` property, or a `.elements` property which is a list of objects with
118-
`.progress` properties. Pace will automatically handle all scaling to make the progress
118+
`.progress` properties. Pace will automatically handle all scaling to make the progress
119119
changes look smooth to the user.
120120

121121
Elements
122122
--------
123123

124124
Elements being rendered to the screen is one way for us to decide that the page has been
125-
rendered. If you would like to use that source of information (not required at all),
126-
specify one or more selectors. You can comma separate the selectors to propertly handle
125+
rendered. If you would like to use that source of information (not required at all),
126+
specify one or more selectors. You can comma separate the selectors to propertly handle
127127
error states, where the progress bar should disappear, but the element we are looking for
128128
may never appear:
129129

@@ -135,23 +135,23 @@ paceOptions = {
135135
}
136136
```
137137

138-
Pace will consider the elements test successful when each selector matches something. For
138+
Pace will consider the elements test successful when each selector matches something. For
139139
this example, when either `.timeline` or `.timeline-error` exist, and either `.user-profile`
140140
or `.profile-error` exist.
141141

142142
Restart Rules
143143
-------------
144144

145145
Most users want the progress bar to automatically restart when a pushState event occurs
146-
(generally means ajax navigation is occuring). You can disable this:
146+
(generally means ajax navigation is occuring). You can disable this:
147147

148148
```javascript
149149
paceOptions = {
150150
restartOnPushState: false
151151
}
152152
```
153153

154-
You can also have pace restart on every ajax request which lasts longer than x ms. You'll want to
154+
You can also have pace restart on every ajax request which lasts longer than x ms. You'll want to
155155
disable this if you make ajax requests the user doesn't need to know about, like precaching:
156156

157157
```javascript
@@ -162,16 +162,16 @@ paceOptions = {
162162

163163
You can always trigger a restart manually by calling `Pace.restart()`
164164

165-
See [the source](https://github.com/CodeByZach/pace/blob/master/pace.js) for a full list of all options.
165+
See [the source](https://github.com/CodeByZach/pace/blob/master/pace.js) for a full list of options.
166166

167167
API
168168
---
169169

170170
Pace exposes the following methods:
171171

172-
- `Pace.start`: Show the progress bar and start updating. Called automatically if you don't use AMD or CommonJS.
172+
- `Pace.start`: Show the progress bar and start updating. Called automatically if you don't use AMD or CommonJS.
173173

174-
- `Pace.restart`: Show the progress bar if it's hidden and start reporting the progress from scratch. Called automatically
174+
- `Pace.restart`: Show the progress bar if it's hidden and start reporting the progress from scratch. Called automatically
175175
whenever `pushState` or `replaceState` is called by default.
176176

177177
- `Pace.stop`: Hide the progress bar and stop updating it.
@@ -254,24 +254,25 @@ Support
254254
-------
255255

256256
Pace is designed to support IE8+ (standards mode), FF 3.5+, Chrome, Safari 4+, Opera 10.5+, and all modern
257-
mobile browsers. If you run into a compatibility issue, or can make a case for supporting something else,
257+
mobile browsers. If you run into a compatibility issue, or can make a case for supporting something else,
258258
please create an issue.
259259

260260
Size
261261
----
262262

263-
pace.js is 4kb minified and gzipped. The themes vary between 0.5 and 4kb.
263+
pace.js is 4kb minified and gzipped. The themes vary between 0.5 and 4kb.
264264

265265
Issues
266266
------
267267

268-
We have obviously not tested this on every website. If you run into an issue, or find a way the automatic
269-
detection could be better, please [create an Issue](https://github.com/CodeByZach/pace/issues/new). If you can include a test case, that's even better.
268+
We have obviously not tested this on every website. If you run into an issue, or find a way the automatic
269+
detection could be better, please [create an Issue](https://github.com/CodeByZach/pace/issues/new). If you can include a test case, that's even better.
270270

271271
Credits
272272
-------
273273

274274
[HubSpot](http://dev.hubspot.com)
275+
[CodeByZach](https://github.com/CodeByZach)
275276

276277
Javascript by [Zack Bloom](http://twitter.com/zackbloom)
277278
CSS by [Adam Schwartz](http://twitter.com/adamfschwartz)

pace-theme-default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* pace.js v1.2.1 | Default theme
2+
* pace.js v1.2.3 | Default theme
33
* https://github.com/CodeByZach/pace/
44
* Licensed MIT © HubSpot, Inc.
55
*/

pace-theme-default.min.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* pace.js v1.2.1 | Default theme
2+
* pace.js v1.2.3 | Default theme
33
* https://github.com/CodeByZach/pace/
44
* Licensed MIT © HubSpot, Inc.
55
*/

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
2-
"name": "pace",
2+
"name": "pace-js",
33
"version": "1.2.3",
44
"description": "Automatically add a progress bar to your site.",
5-
"homepage": "https://codebyzach.github.io/pace/",
6-
"authors": [
7-
"CodeByZach <[email protected]>",
8-
],
5+
"main": "pace.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/CodeByZach/pace.git"
12+
},
913
"keywords": [
1014
"pace",
1115
"pace-js",
@@ -15,19 +19,10 @@
1519
"loading-indicator",
1620
"loading-animation"
1721
],
22+
"author": "CodeByZach <[email protected]>",
1823
"license": "MIT",
19-
"main": "pace.js",
20-
"repository": {
21-
"type": "git",
22-
"url": "https://github.com/CodeByZach/pace/"
24+
"bugs": {
25+
"url": "https://github.com/CodeByZach/pace/issues"
2326
},
24-
"devDependencies": {
25-
"grunt-contrib-coffee": "~0.7.0",
26-
"coffee-script": "~1.6.3",
27-
"grunt-contrib-uglify": "~0.2.4",
28-
"grunt-cli": "~0.1.9",
29-
"grunt": "~0.4.1",
30-
"grunt-contrib-watch": "~0.5.3",
31-
"color": "~0.4.4"
32-
}
33-
}
27+
"homepage": "https://github.com/CodeByZach/pace#readme"
28+
}

0 commit comments

Comments
 (0)