Skip to content

chore: include katex resources from npm - #9712

Merged
logseq-cldwalker merged 4 commits into
logseq:masterfrom
AllanChain:katex-resource-npm
Jun 28, 2023
Merged

logseq-cldwalker merged 4 commits into
logseq:masterfrom
AllanChain:katex-resource-npm

Conversation

@AllanChain

Copy link
Copy Markdown
Contributor

Continuation of #9673

Instead of copying resources into the repo, I made some changes to download them from NPM and integrated them into the build process. JS and fonts are copied to the output and CSS is directly imported from node_modules/.

@sprocketc

Copy link
Copy Markdown
Collaborator

QA'ed this. The fonts are properly loaded from the local fs when we are trying to render mathematical equations.

@logseq-cldwalker logseq-cldwalker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@AllanChain Thanks for doing this in a secure way for everybody! 👍 🚢 Verified js and css is loading as expected with a basic example like $$E = mc^2$$

Comment thread yarn.lock
"@electron/get@^2.0.0":
version "2.0.2"
resolved "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz#ae2a967b22075e9c25aaf00d5941cd79c21efd7e"
resolved "https://registry.yarnpkg.com/@electron/get/-/get-2.0.2.tgz#ae2a967b22075e9c25aaf00d5941cd79c21efd7e"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@sprocketc Looks like these were changed in #9482 so reverting them back

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@logseq-cldwalker I think registry.yarnpkg.com is now just a cname that points to npmjs.org, so those should be the same thing (see https://yarnpkg.com/getting-started/qa#why-registryyarnpkgcom-does-facebook-track-us)
If we want to always use registry.yarnpkg.com for consistency, I'll have to make some additional changes, but I don't think it's worth it.

@logseq-cldwalker
logseq-cldwalker merged commit 28b7e0d into logseq:master Jun 28, 2023
@cnrpman cnrpman mentioned this pull request Jun 29, 2023
1 of 2 tasks
devin-ai-integration Bot pushed a commit that referenced this pull request Oct 1, 2026
chore: include katex resources from npm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants