Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit a73cdd5

Browse files
dlabrecqdgutride
authored andcommitted
feat(modules): each module should have its own index.ts
This allows patternfly-ng modules to be imported like so: import { NotificationModule } from 'patternfly-ng/notification';
1 parent 0bec9ed commit a73cdd5

File tree

26 files changed

+394
-193
lines changed

26 files changed

+394
-193
lines changed

gulpfile.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var libraryBuild = 'build';
2121
var libraryDist = 'dist';
2222
var demoDist = 'dist-demo';
2323
var watchDist = 'dist-watch';
24-
var globalExcludes = [ '!./**/example/**', '!./**/example' ];
24+
var globalExcludes = [ '!./**/example/**', '!./**/example', '!./**/demo/**', '!./**/demo.**' ];
2525

2626
/**
2727
* FUNCTION LIBRARY
@@ -120,8 +120,7 @@ gulp.task('build',
120120
[
121121
'transpile',
122122
'copy-css',
123-
'copy-html',
124-
'copy-static-assets'
123+
'copy-html'
125124
]);
126125

127126
gulp.task('transpile', ['copy-root', 'inline-template'], function () {

index.ts

Lines changed: 0 additions & 138 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.0.0-semantically-released",
44
"description": "A collection of PatternFly Angular components and other useful things to be shared.",
55
"main": "bundles/patternfly-ng.umd.js",
6-
"module": "dist/index.js",
7-
"typings": "dist/index.d.ts",
6+
"module": "index.js",
7+
"typings": "index.d.ts",
88
"scripts": {
99
"build": "npm-run-all --serial remove-dist ts:lint build:library build:demo copy-examples:demo",
1010
"build:demo": "webpack --config config/webpack.demo.js --progress --profile --bail",
@@ -15,6 +15,7 @@
1515
"commit": "git-cz",
1616
"copy-examples:demo": "gulp copy-examples",
1717
"minify": "uglifyjs dist/bundles/ngx-widgets.js --screw-ie8 --compress --mangle --comments --output dist/bundles/patternfly-ng.min.js",
18+
"postinstall": "node src/scripts/install.js",
1819
"publish-travis": "node_modules/patternfly-eng-publish/script/publish-ghpages.sh -t dist-demo",
1920
"reinstall": "npm run clean && npm install",
2021
"remove-dist": "rimraf build dist dist-watch dist-demo",
@@ -178,6 +179,7 @@
178179
}
179180
},
180181
"files": [
181-
"dist/"
182+
"dist",
183+
"src/scripts"
182184
]
183185
}

patternfly-ng.module.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/app/action/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export { Action } from './action';
2+
export { ActionConfig } from './action-config';
3+
export { ActionComponent } from './action.component';
4+
export { ActionModule } from './action.module';

src/app/card/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export { CardAction } from './card-action/card-action';
2+
export { CardActionComponent } from './card-action/card-action.component';
3+
export { CardBase } from './card-base';
4+
export { CardConfig } from './basic-card/card-config';
5+
export { CardConfigBase } from './card-config-base';
6+
export { CardComponent } from './basic-card/card.component';
7+
export { CardFilter } from './card-filter/card-filter';
8+
export { CardFilterComponent } from './card-filter/card-filter.component';
9+
export { CardFilterPosition } from './card-filter/card-filter-position';
10+
export { CardModule } from './card.module';
11+
export { InfoStatusCardComponent } from './info-status-card/info-status-card.component';
12+
export { InfoStatusCardConfig } from './info-status-card/info-status-card-config';

src/app/chart/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export { ChartConfig } from './chart-config';
2+
export { ChartDefaults } from './chart-defaults';
3+
export { ChartBase } from './chart-base';
4+
export { ChartModule } from './chart.module';
5+
export { DonutComponent } from './donut/donut.component';
6+
export { DonutConfig } from './donut/donut-config';
7+
export { SparklineComponent } from './sparkline/sparkline.component';
8+
export { SparklineConfig } from './sparkline/sparkline-config';
9+
export { SparklineData } from './sparkline/sparkline-data';

src/app/empty-state/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { EmptyStateComponent } from './empty-state.component';
2+
export { EmptyStateConfig } from './empty-state-config';
3+
export { EmptyStateModule } from './empty-state.module';

src/app/filter/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export { Filter } from './filter';
2+
export { FilterComponent } from './filter.component';
3+
export { FilterConfig } from './filter-config';
4+
export { FilterEvent } from './filter-event';
5+
export { FilterField } from './filter-field';
6+
export { FilterFieldsComponent } from './filter-fields.component';
7+
export { FilterModule } from './filter.module';
8+
export { FilterResultsComponent } from './filter-results.component';
9+
export { FilterQuery } from './filter-query';
10+
export { FilterType } from './filter-type';

0 commit comments

Comments
 (0)