forked from crabbly/Print.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly support
window.printJS
and module print
Expose `printJS` function on the window object (if window exists) (see `/src/index.js`) Build package via Webpack as a UMD library and purposefully rename `print` to avoid conflicts. Update Typescript typings file to reflect this. Good resources: http://siawyoung.com/coding/javascript/exporting-es6-modules-as-single-scripts-with-webpack.html https://webpack.js.org/guides/author-libraries/ https://stackoverflow.com/questions/40294870/module-exports-vs-export-default-in-node-js-and-es6/40295288#40295288
- Loading branch information
Sam Tsai
committed
Sep 21, 2018
1 parent
251dea3
commit 3f6c576
Showing
4 changed files
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ if (typeof window !== 'undefined') { | |
window.printJS = printJS | ||
} | ||
|
||
module.exports = printJS | ||
export default printJS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters