Closed float3 closed 6 months ago
I need guidance with testing and let me know if you're happy with this build process as described in the scripts in package.json
I guess now that I think about it, a slightly better way of doing this might be uploading the package to npm and just pulling it in, then you won't have to deal with building it, let me know what you think
building works fine, but testing doesn't, the TOC annotations aren't even showing up
@yzhang-gh let me know once you get to it (: thanks for your help
Many thanks.
I guess now that I think about it, a slightly better way of doing this might be uploading the package to npm and just pulling it in, then you won't have to deal with building it, let me know what you think
I think so and I guess then it won't break the current CI. Would you mind hosting this zola-slug npm package?
the broken CI is because I made a mistake, we need to build the rust project before running npm ci
I guess, but a separate npm package is probably the better approach, I will host it!
@yzhang-gh I realized the problem with this is that unless you wanna read the wasm you can't verify what code is in https://www.npmjs.com/package/zola-slug?activeTab=code
I compiled it with wasm-pack but you probably shouldn't just trust me
let me know how you wish to proceed
Thanks for the heads up. Then I think it would be better if the build process is also public (e.g. GitHub Action? GitHub Packages?), although I remember I tried it many years ago and it didn't work 😂.
@yzhang-gh now the workflow should work and I tested the final vsix by using it on my website https://github.com/float3/float3.github.io/commit/80b82870caf74ed570d0ef39b80c9ff0b3c29c7c the toc here was generated with the new slugify strategy
the build process here is public, we're not using the npmjs package
looks like the action still doesn't work, not sure why right now, the steps described in the workflow work perfectly when I run it on my local machine
converting to draft for now while I figure some things out
ci is passing and the extension is working https://github.com/float3/vscode-markdown/actions
here is a demo https://github.com/float3/float3.github.io/blob/master/content/notes/food.md?plain=1#L10-L39 you should be able to try it yourself
I think it's ready for review @yzhang-gh
Nice work. I will try to take a look soon.
if you're more experienced with webpack let me know if you know a better way of doing this
it looks like I can maybe use CopyPlugin or module rules to copy the file to the right place, then we can avoid the bad CI change I made
edit: it worked, we fixed it
Amazing!
if you're more experienced with webpack
Unfortunately no 🥲, but happy to see you did it.
like this the first time zola slugify will always fail on my machine, and always succeed on the second try since this way it's a race condition, I'm open to suggestions
now additionally we could do some error handling if it hasn't finished importing yet
@yzhang-gh can you take another look over the changes
🍻
好的! 🥳
https://github.com/yzhang-gh/vscode-markdown/issues/1417#issuecomment-2078624439