Open davestewart opened 5 years ago
I was also in the process of adding a demo.
Happy to PR this into yours.
@davestewart this looks very similar to this one https://github.com/kay999/vue-constants
@phiter I guess we are all solving similar problems!
I think staticData
is more in line with asyncData
from Nuxt and this package is more useful in that you can provide a function, and it is already on NPM.
vue-constants is also on npm and it has over 1k weekly downloads. I found this package when I had the exact same idea XD
Hmm... that's promising. Maybe I'll push my PR there as well. First one to pull wins!
Sorry chaps, been off the OS wagon for a while. Will take a look at this today.
Sweet! I'm absolutely terrible at getting back to my OS tickets when I'm busy so I know how it is
Hi @wagerfield ...
It's been a while!
Any chance you could look at this?
But to solve a different problem, adding enums to the template.
Then I realised it was just static data, so checked NPM and here we are :P
No point having two packages out there - do you accept PRs? Could I be a maintainer?
I'd add the following options:
namespace
- so data can sit under a node; avoids clashesfreeze
- so things like enums (clearly shared, project-wide) can't be alteredThe code I wrote already is here: