Closed jhildenbiddle closed 6 years ago
Hi again, @jperasmus!
Thought I'd make offer two quick updates that may save some frustration.
The README update is self-explanatory. This comment reminded me that we should be recommended a version-specific CDN URL to avoid potential issues with future releases.
The index.js
in the root is there as a patch for v1 installs. The call to v1 window.DocsifyCopyCodePlugin.init()
is breaking productions sites, so this file provides a placeholder method that prevents the JS error and outputs an update message in the console:
[Update] docsify-copy-code has been updated. Please see new installation instructions at https://github.com/jperasmus/docsify-copy-code.
After they update the URL, the other [Deprecation]
message will appear in the console if they forgot to remove the v1 stylesheet and init()
call in place.
[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary.
[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.
In hindsight, I wish I had done this in the initial PR. It feels a little weird to have an index.js
in the root of an NPM module that is just a patch for older installs, but I don't know of a better way to work around the v2 breaking changes.
Thanks, and apologies for any headaches the breaking change may have caused. 🙄
Thanks for the changes, this should alleviate some of the pains we've seen. I don't mind the school of hard knocks - learning from the experience 🤓