seamless-scroll-polyfill
Advanced tools
Comparing version 0.4.5 to 0.5.0
@@ -5,3 +5,3 @@ { | ||
"description": "Smooth Scroll behavior polyfill", | ||
"version": "0.4.5", | ||
"version": "0.5.0", | ||
"author": { | ||
@@ -21,27 +21,37 @@ "name": "Dustan Kasten", | ||
"devDependencies": { | ||
"ava": "^0.25.0", | ||
"eslint": "^4.19.1", | ||
"husky": "^0.14.3", | ||
"@babel/core": "^7.0.0-beta.51", | ||
"ava": "1.0.0-beta.6", | ||
"babel-minify": "^0.4.3", | ||
"babel-preset-minify": "^0.4.3", | ||
"lint-staged": "^6.1.1", | ||
"lodash.clonedeep": "^4.5.0", | ||
"prettier": "^1.11.1", | ||
"rollup": "^0.50.1", | ||
"uglify-js": "^3.3.16" | ||
"prettier": "^1.13.5", | ||
"rollup": "^0.61.2", | ||
"rollup-plugin-babel": "^4.0.0-beta.5", | ||
"rollup-plugin-typescript2": "^0.15.1", | ||
"ts-node": "^7.0.0", | ||
"tslint": "^5.10.0", | ||
"tslint-config-prettier": "^1.13.0", | ||
"tslint-plugin-prettier": "^1.3.0", | ||
"typescript": "^2.9.2" | ||
}, | ||
"main": "dist/seamless-scroll.js", | ||
"main": "dist/seamless.js", | ||
"umd:main": "dist/seamless.js", | ||
"jsnext:main": "dist/seamless.esm.js", | ||
"module": "dist/seamless.esm.js", | ||
"browser": "dist/seamless.browser.min.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"lint": "eslint {src,test}/**/*.js", | ||
"test": "ava test/seamless-scroll.test.js --verbose", | ||
"posttest": "npm run lint", | ||
"lint": "tslint {src,test}/**/*.{js,ts}", | ||
"test": "ava -v", | ||
"precommit": "lint-staged", | ||
"prebuild": "npm test", | ||
"build": "rollup -c rollup.config.js", | ||
"preminify": "npm run build", | ||
"minify": "uglifyjs dist/seamless-scroll.js -c -m -o dist/seamless-scroll.min.js --verbose", | ||
"listdiff": "prettier --list-different {src,test}/**/*.js", | ||
"format": "prettier --write {src,test}/**/*.js" | ||
"listdiff": "prettier --list-different {src,test}/**/*.{js,ts}", | ||
"format": "prettier --write {src,test}/**/*.{js,ts}" | ||
}, | ||
"lint-staged": { | ||
"linters": { | ||
"{src,test}/**/*.js": [ | ||
"{src,test}/**/*.{js,ts}": [ | ||
"prettier --list-different", | ||
@@ -52,5 +62,2 @@ "git add" | ||
}, | ||
"prettier": { | ||
"singleQuote": true | ||
}, | ||
"repository": { | ||
@@ -57,0 +64,0 @@ "type": "git", |
@@ -16,5 +16,5 @@ [![Build Status](https://travis-ci.org/hufan-akari/seamless-scroll-polyfill.svg?branch=master)](https://travis-ci.org/hufan-akari/seamless-scroll-polyfill) | ||
```js | ||
import { polyfill } from 'seamless-scroll-polyfill'; | ||
import { seamless } from 'seamless-scroll-polyfill'; | ||
polyfill(); | ||
seamless(); | ||
``` | ||
@@ -25,3 +25,3 @@ | ||
```js | ||
polyfill({ force: true }); | ||
seamless({ force: true }); | ||
``` | ||
@@ -32,3 +32,3 @@ | ||
```js | ||
polyfill({ duration: 500 }); | ||
seamless({ duration: 500 }); | ||
``` | ||
@@ -39,4 +39,3 @@ | ||
```html | ||
<script src="path/to/smoothscroll.min.js" ></script> | ||
<script>seamless()</script> | ||
<script src="path/to/seamless.browser.min.js" ></script> | ||
``` | ||
@@ -47,11 +46,5 @@ | ||
```html | ||
<script src="path/to/smoothscroll.min.js" data-polyfill="auto"></script> | ||
<script src="path/to/seamless.browser.min.js" data-polyfill="force"></script> | ||
``` | ||
or | ||
```html | ||
<script src="path/to/smoothscroll.min.js" data-polyfill="force"></script> | ||
``` | ||
<blockquote> | ||
@@ -77,4 +70,6 @@ | ||
When including the polyfill in a script tag, it will run immediately after loaded. If you are importing it as a dependency, make sure to call the `polyfill` method: | ||
When including the polyfill in a script tag, it will run immediately after loaded. | ||
If you are importing it as a dependency, make sure to call the `polyfill` method: | ||
```js | ||
@@ -103,3 +98,3 @@ import smoothscroll from 'smoothscroll-polyfill'; | ||
The requirements to contribute are [yarn](https://yarnpkg.com) and the latest LTS [Node.js](https://nodejs.org/en/)] version. | ||
The requirements to contribute are [yarn](https://yarnpkg.com) and the latest LTS [Node.js](https://nodejs.org/en/) version. | ||
@@ -106,0 +101,0 @@ First, fork the repository and do `yarn install` in the root folder to get all the dependencies to work with. Create a feature branch, write your stuff and run `yarn test` to check code style and prevent bugs. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
206902
13
920
15
125
1