File tree Expand file tree Collapse file tree 4 files changed +1169
-461
lines changed Expand file tree Collapse file tree 4 files changed +1169
-461
lines changed Original file line number Diff line number Diff line change
1
+ { "presets" : [" env" ] }
Original file line number Diff line number Diff line change 2
2
"name" : " scroll-into-view-if-needed" ,
3
3
"version" : " 1.0.6" ,
4
4
"description" : " Element.scrollIntoViewIfNeeded ponyfill that can animate the scrolling" ,
5
- "main" : " dist/bundle .js" ,
5
+ "main" : " dist/index .js" ,
6
6
"typings" : " typings.d.ts" ,
7
7
"scripts" : {
8
8
"test" : " echo \" Error: no test specified\" && exit 1" ,
9
- "build" : " rollup src/index.js --format cjs -c --output dist/bundle.js && rollup test/index.js -c -f umd --output test/bundle.js" ,
9
+ "build" : " npm run clean && npm run build-module && npm run build-bundle" ,
10
+ "build-module" : " babel src -d dist" ,
11
+ "build-bundle" : " rollup src/index.js --format cjs -c --output dist/bundle.js && rollup test/index.js -c -f umd --output test/bundle.js" ,
12
+ "clean" : " rm -rf dist" ,
10
13
"prepublish" : " npm run build" ,
11
14
"postversion" : " git add package.json && git commit -m \" chore(package): update version\" " ,
12
15
"postpublish" : " gh-release"
32
35
"amator" : " ^1.0.1"
33
36
},
34
37
"devDependencies" : {
35
- "babel" : " ^6.5.2" ,
38
+ "babel-cli" : " ^6.23.0" ,
39
+ "babel-preset-env" : " ^1.2.1" ,
36
40
"babel-preset-es2015-rollup" : " ^3.0.0" ,
37
41
"gh-release" : " ^2.2.1" ,
38
42
"rollup" : " ^0.41.4" ,
Original file line number Diff line number Diff line change 1
- declare module 'scroll-into-view-if-needed' {
2
- interface ScrollIntoViewIfNeededOptions {
3
- centerIfNeeded ?: boolean ;
4
- duration ?: number ;
5
- easing ?: 'ease' | 'easeIn' | 'easeOut' | 'easeInOut' | 'linear' ;
6
- }
7
-
8
- interface ScrollIntoViewIfNeededFunction {
9
- (
10
- node : Element ,
11
- centerIfNeeded : boolean ,
12
- options ?: ScrollIntoViewIfNeededOptions ,
13
- ) : void ;
14
- }
15
- const ScrollIntoViewIfNeeded : ScrollIntoViewIfNeededFunction ;
16
- export = ScrollIntoViewIfNeeded ;
1
+ export interface ScrollIntoViewIfNeededOptions {
2
+ centerIfNeeded ?: boolean ;
3
+ duration ?: number ;
4
+ easing ?: 'ease' | 'easeIn' | 'easeOut' | 'easeInOut' | 'linear' ;
17
5
}
6
+
7
+ export default function (
8
+ node : Element ,
9
+ centerIfNeeded : boolean ,
10
+ options ?: ScrollIntoViewIfNeededOptions ,
11
+ ) : void ;
You can’t perform that action at this time.
0 commit comments