Skip to content
Permalink
Browse files

chore: add banner to bundle

  • Loading branch information...
rigor789 committed Mar 18, 2019
1 parent 9925f18 commit ae12c4f0942d8a8d518428c91819117986c88346
Showing with 15 additions and 0 deletions.
  1. +7 −0 rollup.config.js
  2. +8 −0 vue-scrollto.js
@@ -2,12 +2,19 @@ import babel from 'rollup-plugin-babel'
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'

import {version} from './package.json'

export default {
input: './src/index.js',
output: {
file: 'vue-scrollto.js',
name: 'vue-scrollto',
format: 'umd',
banner: `/*!
* vue-scrollto v${version}
* (c) 2019 Randjelovic Igor
* @license MIT
*/`,
},
plugins: [
resolve(),
@@ -1,3 +1,8 @@
/*!
* vue-scrollto v2.14.0
* (c) 2019 Randjelovic Igor
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -391,6 +396,9 @@
var elementBottom = elementTop + element.offsetHeight;

if (elementTop >= containerTop && elementBottom <= containerBottom) {
// make sure to call the onDone callback even if there is no need to
// scroll the container. Fixes #111 (ref #118)
onDone(element);
return;
}
}

0 comments on commit ae12c4f

Please sign in to comment.
You can’t perform that action at this time.