Skip to content

Commit

Permalink
Merge pull request #152 from bigopon/master
Browse files Browse the repository at this point in the history
build(all): adjust umd build, add umd-es2015 for unpkg
  • Loading branch information
EisenbergEffect authored Mar 23, 2019
2 parents d32c05d + 32d687a commit c489408
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"main": "dist/commonjs/aurelia-ui-virtualization.js",
"module": "dist/es2015/aurelia-ui-virtualization.js",
"browser": "dist/umd/aurelia-ui-virtualization.js",
"unpkg": "dist/umd/aurelia-ui-virtualization.js",
"unpkg": "dist/umd-es2015/aurelia-ui-virtualization.js",
"typings": "dist/aurelia-ui-virtualization.d.ts",
"repository": {
"type": "git",
Expand Down
23 changes: 19 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@ import typescript from 'rollup-plugin-typescript2';
export default [
{
input: 'src/aurelia-ui-virtualization.ts',
output: {
file: 'dist/es2015/aurelia-ui-virtualization.js',
format: 'esm'
},
output: [
{
file: 'dist/es2015/aurelia-ui-virtualization.js',
format: 'esm'
},
{
file: 'dist/umd-es2015/aurelia-ui-virtualization.js',
format: 'umd',
name: 'au.uiVirtualization',
globals: {
'aurelia-binding': 'au',
'aurelia-dependency-injection': 'au',
'aurelia-pal': 'au',
'aurelia-templating': 'au',
'aurelia-templating-resources': 'au',
}
}
],
plugins: [
typescript({
cacheRoot: '.rollupcache',
Expand Down Expand Up @@ -75,6 +89,7 @@ export default [
cacheRoot: '.rollupcache',
tsconfigOverride: {
compilerOptions: {
target: 'es5',
removeComments: true,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities-dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IView } from './interfaces';
export const getScrollContainer = (element: Node): HTMLElement => {
let current = element.parentNode as HTMLElement;
while (current !== null) {
if (this.hasOverflowScroll(current)) {
if (hasOverflowScroll(current)) {
return current;
}
current = current.parentNode as HTMLElement;
Expand Down

0 comments on commit c489408

Please sign in to comment.