Skip to content

Commit 9c2f33c

Browse files
authored
Rollup build (#311)
* replace gulp build with rollup * bump version * point main to es6 module * revert change to test umd * remove browserify * update eslint config * fix rollup error * update readme
1 parent 6a34c53 commit 9c2f33c

13 files changed

+7044
-16933
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
root: true,
3+
ignorePatterns: ['*.js', '*.html', 'node_modules/*'],
34
parser: '@typescript-eslint/parser',
45
plugins: [
56
'@typescript-eslint',

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Or tinker with CountUp in [Stackblitz](https://stackblitz.com/edit/countup-types
2121
- **Highly customizeable** with a large range of options, you can even substitute numerals.
2222
- **Smart easing**: CountUp intelligently defers easing until it gets close enough to the end value for easing to be visually noticeable. Configureable in the [options](#options).
2323
- **Plugins** allow for alternate animations like the [Odometer plugin](https://www.npmjs.com/package/odometer_countup)
24+
2425
![Odomoeter plugin](./demo/images/odometer_plugin.gif)
25-
- **Separate bundles** for modern and legacy browsers, with and without the requestAnimationFrame polyfill. Choose `countUp.min.js` for modern browsers or `countUp.withPolyfill.min.js` for IE9 and older, and Opera mini.
2626

2727
## Usage:
2828

@@ -143,7 +143,7 @@ countUp.handleScroll();
143143

144144
Currently there's just one plugin, the **[Odometer Plugin](https://github.com/msoler75/odometer_countup.js)**.
145145

146-
To use a plugin, use the plugin option:
146+
To use a plugin, you'll need to first install the plugin package. Then you can include it and use the plugin option. See each plugin's docs for more detailed info.
147147
```js
148148
const countUp = new CountUp('targetId', 5234, {
149149
plugin: new Odometer({ duration: 2.3, lastDigitDelay: 0 }),
@@ -156,7 +156,7 @@ If you'd like to make your own plugin, see [the docs](#creating-animation-plugin
156156

157157
## Including CountUp
158158

159-
CountUp is distributed as an ES6 module because it is the most standardized and most widely compatible module for browsers, though a UMD module is [also included](#umd-module).
159+
CountUp is distributed as an ES6 module because it is the most standardized and most widely compatible module for browsers, though a UMD module is [also included](#umd-module), along with a separate requestAnimationFrame polyfill (see below).
160160

161161
For the examples below, first install CountUp. This will give you the latest:
162162
```
@@ -206,6 +206,10 @@ var numAnim = new countUp.CountUp('myTarget', 2000);
206206
numAnim.start()
207207
```
208208

209+
### requestAnimationFrame polyfill
210+
211+
You can include `dist/requestAnimationFrame.polyfill.js` if you want to support IE9 and older, and Opera mini.
212+
209213
---
210214

211215
## Contributing

dist/countUp.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export declare class CountUp {
4949
* Smart easing works by breaking the animation into 2 parts, the second part being the
5050
* smartEasingAmount and first part being the total amount minus the smartEasingAmount. It works
5151
* by disabling easing for the first part and enabling it on the second part. It is used if
52-
* usingEasing is true and the total animation amount exceeds the smartEasingThreshold.
52+
* useEasing is true and the total animation amount exceeds the smartEasingThreshold.
5353
*/
5454
private determineDirectionAndSmartEasing;
5555
start(callback?: (args?: any) => any): void;

dist/countUp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var CountUp = /** @class */ (function () {
1515
var _this = this;
1616
this.endVal = endVal;
1717
this.options = options;
18-
this.version = '2.6.0';
18+
this.version = '2.6.1';
1919
this.defaults = {
2020
startVal: 0,
2121
decimalPlaces: 0,
@@ -177,7 +177,7 @@ var CountUp = /** @class */ (function () {
177177
* Smart easing works by breaking the animation into 2 parts, the second part being the
178178
* smartEasingAmount and first part being the total amount minus the smartEasingAmount. It works
179179
* by disabling easing for the first part and enabling it on the second part. It is used if
180-
* usingEasing is true and the total animation amount exceeds the smartEasingThreshold.
180+
* useEasing is true and the total animation amount exceeds the smartEasingThreshold.
181181
*/
182182
CountUp.prototype.determineDirectionAndSmartEasing = function () {
183183
var end = (this.finalEndVal) ? this.finalEndVal : this.endVal;

dist/countUp.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)