Closed yangyaoshan closed 5 years ago
I'm not sure what taobao.org is but that doesn't looks like the official registry to me?
I did publish markdwon-it-anchor@5.1.0 yesterday night so it might have been a cache sync issue between the registry you're using and the official npm registry. Does it work if you try again now?
Published? What changed? We need to update the changelog.md
Right, I merged #52
While we are still in this topic, I would like to suggest a rewrite using microbundle. I believe it would fix: https://github.com/valeriangalliat/markdown-it-anchor/issues/46 and https://github.com/valeriangalliat/markdown-it-anchor/issues/40 in the process. But because the project is really popular --- +100k/week --- I'm a bit scared to break things =D congrats for us!
Wow I actually had no clue it got that popular! :tada:
I didn't know microbundle, but I'm not sure to get the point of a bundler since this project have 0 dependencies? Also how would it make us more confident about not breaking things? Had the last PR I merged broke things, microbundle or not, those bugs would still have gotten the same exposure, unless I don't understand something?
I think the 2 issues you mention would be fixed by transpiling the code to ES5 (or writing the code directly in ES5 which I'm open to), and that might be one of the features of microbundle, then I get how it would make sense for those issues.
Definitely feel free to add microbundle to the project if that can fix issues and improve the stability of the package!
Cheers :)
Yes, you got it right, by building the library with microbundle we only need to keep track of the ES6 source code and it will generate optimized dist
files for CJS (node), MJS (Javascript Modules), and UMD (unpkg/browsers). So the library will start to work out-of-the-box for users who doesn't transpile the node_modules
and also get the benefit from modern app bundlers that will try to tree-shake the dependencies to make better code splits.
Ok, I'm going to work on the port to microbundle tonight. I'm also closing this because taobao.org is not the official registry.
I installed vuepress today,but the terminal show this error: Install fail! Error: GET https://registry.npm.taobao.org/markdown-it-anchor/download/markdown-it-anchor-5.1.0.tgz response 404 status How to fix it?