unkit
unkit copied to clipboard
feat: nuxt module
https://github.com/ineshbose/nuxt-unjs-module/issues/4
(Let me know if you were thinking to convert to monorepo with unkit/nuxt
as a separate package)
@pi0 - seeking advice on how to approach the build for this! (Please check my message on Discord)
Thanks for PR dear @ineshbose. Sorry i am busy till weekend. Will check ASAP.
Lately I've been thinking of composables like useScule('camelCase', 'my-string')
, with the first argument as function name and second (onwards) as input. This may not be good for variable argument sizes unfortunately.
The idea I think I should sit on:
- Use star-imports for module instead, like:
addImports({ name: '*', as: 'scule', from: 'scule' })
// then it would be used as
scule.camelCase('hello-world')
removing a lot of unnecessary complexities. Usage would be documented into the README.
- Keep nuxt-module code in
nuxt/
rather thansrc/nuxt/
as I'm unsure how to configure unbuild (with the usage ofnuxt-module-builder
)
I'll rework the PR at the earliest (est. ~6th May; have a lot going at the moment) 🙂
I see there is a $
prefix defined.
Could you update the readme to show the usage please?
(closing this, we can definitely discuss this at a much better/easier time)