-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update package.json to point 'main' at dist/katex.js #791
Conversation
Testing:
But I get the same error. If I change the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
package.json
Outdated
@@ -8,7 +8,7 @@ | |||
"url": "git://github.com/Khan/KaTeX.git" | |||
}, | |||
"files": [ | |||
"katex.js", | |||
"dist/katex.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I think this line edit should be reverted. It's probably good to include the root (ES6) katex.js
in the NPM package (why not? then people can choose). dist
is already fully included 3 lines below. It's the main
key, 6 lines above, that seems to need to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I totally messed this up. I meant to change main
.
Summary: Now that we're using ES6 import statements in our source code it makes it difficult for people to consume the katex package as a node module unless they're using node.js version 8.x. This diff points the node entry point to dist/katex.js which is the compiled version of katex.js. Test Plan: - publish - create a new project node project and add the new npm katex package as a deep - require katex in a test file and run it using node.js version 6.x
b73d4bc
to
7d68707
Compare
Tested and it works. Thanks @kevinbarabash for implementing this! |
@edemaine thanks for testing it. |
I should probably do an 0.8.2 release now that this has been merged. |
Yeah, makes sense, as this will affect all NPM users. (on Node 6) |
I was thinking that for future major release it might be good to do a couple of RC release to work out the kinks when there are big changes. |
Given our experience with 0.8 and 0.7, that sounds like a good idea. 😄 |
Summary:
Now that we're using ES6 import statements in our source code
it makes it difficult for people to consume the katex package
as a node module unless they're using node.js version 8.x.
This diff points the node entry point to dist/katex.js which
is the compiled version of katex.js.
Test Plan:
Fixes: #786