kevin940726 / remark-code-import

📝 Populate code blocks from files
https://npm.im/remark-code-import
MIT License
63 stars 11 forks source link

Export an ESM default to support remark-cli #26

Closed djmcgreal-cc closed 1 year ago

djmcgreal-cc commented 1 year ago

Hi,

I'm unable to run the plugin through remark-cli.

Error: Expected a plugin or preset exported as the default export

See: https://github.com/remarkjs/remark/blob/main/doc/plugins.md#create-plugins, https://github.com/remarkjs/remark/issues/654#issuecomment-1532846049

kevin940726 commented 1 year ago

Good idea! I'll try to find some time to do this. PR welcome too!

djmcgreal-cc commented 1 year ago

I'd love to be able to help but I don't know enough about it I'm afraid. Thanks in advance if you're able to make the addition though!

kevin940726 commented 1 year ago

There should now be a default export in the latest version v1.2.0. Please try it out and LMK if it works for you :).

djmcgreal-cc commented 1 year ago

It works, thank you kindly.