Skip to content

Commit

Permalink
Improve NPM package with main file and TypeScript types
Browse files Browse the repository at this point in the history
Fixes openid#33
  • Loading branch information
Meligy committed Nov 6, 2017
1 parent 103c336 commit b1ec541
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 1 deletion.
27 changes: 27 additions & 0 deletions built/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export * from './node_support';
export * from './authorization_request';
export * from './authorization_request_handler';
export * from './authorization_request_handler_test';
export * from './authorization_request_test';
export * from './authorization_response';
export * from './authorization_response_test';
export * from './authorization_service';
export * from './authorization_service_configuration';
export * from './authorization_service_configuration_test';
export * from './errors';
export * from './errors_test';
export * from './flags';
export * from './logger';
export * from './query_string_utils';
export * from './query_string_utils_test';
export * from './redirect_based_handler';
export * from './revoke_token_request';
export * from './revoke_token_request_test';
export * from './storage';
export * from './token_request';
export * from './token_request_handler';
export * from './token_request_test';
export * from './token_response';
export * from './token_response_test';
export * from './types';
export * from './xhr';
23 changes: 23 additions & 0 deletions built/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions built/node_support/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './node_request_handler';
export * from './node_requestor';
8 changes: 8 additions & 0 deletions built/node_support/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"app/**",
"built/**"
],
"main": "built/index.js",
"types": "built/index.d.ts",
"scripts": {
"preapp": "npm run-script watch",
"app": "node_modules/.bin/watchify built/app/index.js -o built/app/bundle.js & http-server -p 8000",
Expand Down
27 changes: 27 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export * from './node_support';
export * from './authorization_request';
export * from './authorization_request_handler';
export * from './authorization_request_handler_test';
export * from './authorization_request_test';
export * from './authorization_response';
export * from './authorization_response_test';
export * from './authorization_service';
export * from './authorization_service_configuration';
export * from './authorization_service_configuration_test';
export * from './errors';
export * from './errors_test';
export * from './flags';
export * from './logger';
export * from './query_string_utils';
export * from './query_string_utils_test';
export * from './redirect_based_handler';
export * from './revoke_token_request';
export * from './revoke_token_request_test';
export * from './storage';
export * from './token_request';
export * from './token_request_handler';
export * from './token_request_test';
export * from './token_response';
export * from './token_response_test';
export * from './types';
export * from './xhr';
2 changes: 2 additions & 0 deletions src/node_support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './node_request_handler';
export * from './node_requestor';

2 comments on commit b1ec541

@tikurahul
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. I am on vacation and will look at this first thing on Thu. But, I was wondering if we should:

  • Include the tests at all?
  • Include the support classes for browser environments and node environments separately. Any thoughts ?

@Meligy
Copy link
Owner Author

@Meligy Meligy commented on b1ec541 Nov 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tikurahul PR updated, please check openid#34 (comment)

Please sign in to comment.