diff --git a/build.js b/build.js index b9f5c276..0dadc12a 100644 --- a/build.js +++ b/build.js @@ -29,7 +29,7 @@ echo(chalk.green(`AoT compilation completed`)); /* Creates bundles: ESM/ES5 and UMD bundles */ echo(`Start bundling`); echo(`Rollup package`); -exec(`rollup -i ${NPM_DIR}/index.js -o ${MODULES_DIR}/${PACKAGE}.js --sourcemap`, {silent: true}); +exec(`rollup -i ${NPM_DIR}/${PACKAGE}.js -o ${MODULES_DIR}/${PACKAGE}.js --sourcemap`, {silent: true}); exec(`node scripts/map-sources -f ${MODULES_DIR}/${PACKAGE}.js`); echo(`Downleveling ES2015 to ESM/ES5`); diff --git a/index.ts b/index.ts deleted file mode 100644 index fc2fa81b..00000000 --- a/index.ts +++ /dev/null @@ -1 +0,0 @@ -import { InfiniteScrollModule } from './src/ngx-infinite-scroll'; diff --git a/ngx-infinite-scroll.ts b/ngx-infinite-scroll.ts new file mode 100644 index 00000000..4aaf8f92 --- /dev/null +++ b/ngx-infinite-scroll.ts @@ -0,0 +1 @@ +export * from './public_api'; diff --git a/package.json b/package.json index e2a78213..210d37fe 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "compodoc-serve": "compodoc -s", "transpile": "ngc -p ./tsconfig.json" }, - "typings": "./index.d.ts", + "typings": "./ngx-infinite-scroll.d.ts", "author": "Oren Farhi (orizens.com)", "repository": { "type": "git", @@ -71,4 +71,4 @@ "sorcery": "0.10.0", "yargs": "7.0.2" } -} \ No newline at end of file +} diff --git a/public_api.ts b/public_api.ts index 878626fe..b85e97d7 100644 --- a/public_api.ts +++ b/public_api.ts @@ -9,5 +9,5 @@ /** * Entry point for all public APIs of the package. */ -export { InfiniteScrollModule } from './src/modules/ngx-infinite-scroll.module'; +export * from './src/ngx-infinite-scroll'; diff --git a/src/ngx-infinite-scroll.ts b/src/ngx-infinite-scroll.ts index a63db194..600a441c 100644 --- a/src/ngx-infinite-scroll.ts +++ b/src/ngx-infinite-scroll.ts @@ -1,12 +1,12 @@ // Public classes. +export { + ContainerRef, InfiniteScrollEvent, + IPositionElements, IPositionStats, IScrollStats, IScrollerConfig, IResolver +} from './models'; + export { InfiniteScrollDirective } from './modules/infinite-scroll.directive'; export { PositionResolver } from './services/position-resolver'; export { AxisResolver } from './services/axis-resolver'; export { ScrollRegister } from './services/scroll-register'; export { ScrollResolver } from './services/scroll-resolver'; export { InfiniteScrollModule } from './modules/ngx-infinite-scroll.module'; - -export { - ContainerRef, InfiniteScrollEvent, - IPositionElements, IPositionStats, IScrollStats, IScrollerConfig, IResolver -} from './models'; diff --git a/tsconfig-build.json b/tsconfig-build.json index f5d35a07..516f0750 100644 --- a/tsconfig-build.json +++ b/tsconfig-build.json @@ -23,7 +23,7 @@ "skipTemplateCodegen": true, "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "ngx-infinite-scroll.js", "flatModuleId": "ngx-infinite-scroll" } } \ No newline at end of file