Skip to content

Commit

Permalink
now on NPM 🔥
Browse files Browse the repository at this point in the history
  • Loading branch information
bfiessinger authored Feb 14, 2020
1 parent 489799e commit 502b2be
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ You can work with any HTML Element far beyond anchor tags.

## Getting started
### Installation
[Download](https://github.com/bfiessinger/scrollToSmooth/archive/master.zip) the repository and include the production ready code from the <code>dist</code> folder in your project.

Include the script in your code:
```html
<script src="path/to/scrolltosmooth.min.js"></script>
```
#### NPM
`npm install scrollToSmooth`

or use a CDN:
#### From a CDN
```html
<script src="https://cdn.jsdelivr.net/gh/bfiessinger/scrollToSmooth@latest/dist/scrolltosmooth.min.js"></script>
<!-- OR -->
<script src="https://cdn.jsdelivr.net/gh/bfiessinger/scrollToSmooth@{VERSION}/dist/scrolltosmooth.min.js"></script>
```

#### Download
[Download](https://github.com/bfiessinger/scrollToSmooth/archive/master.zip) the repository and include the production ready code from the <code>dist</code> folder in your project.

Include the script in your code:
```html
<script src="path/to/scrolltosmooth.min.js"></script>
```

## Usage
```javascript
let smoothScroll = new scrollToSmooth('a', {
Expand Down Expand Up @@ -263,4 +268,4 @@ data contains an object with values for `startPosition` and `endPosition`
15+ ✔ | 7+ ✔ | 10+ ✔ | 12+ ✔ | 15+ ✔ | 6+ ✔ |

### Polyfills
Support for older browsers requires a polyfill for <code>requestAnimationFrame()</code>
Support for older browsers requires a polyfill for `requestAnimationFrame()`
4 changes: 4 additions & 0 deletions changelog.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 2.1.3
- Fixed wrong compiled code
- Published NPM Release

### 2.1.2
- Bugfix: linear easing not working

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrolltosmooth",
"version": "2.1.2",
"version": "2.1.3",
"description": "a vanilla JS smooth scroll to anchor script",
"main": "src/scrolltosmooth.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { terser } from 'rollup-plugin-terser';
const prettier = require('rollup-plugin-prettier');

const srcScript = 'src/scrolltosmooth.js';
const version = '2.1.2';
const version = '2.1.3';
const banner = '/**\n\
* Vanilla JS Smooth Scroll\n\
* Author: Bastian Fießinger\n\
Expand Down

0 comments on commit 502b2be

Please sign in to comment.