-
-
Notifications
You must be signed in to change notification settings - Fork 131
Add Nuxt.js generator #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @alOneh. Thank you for your awesome job. Are there any updates about this? Is it production ready? I'm thinking of using it in my project. |
@sergerdn did you try it ? If so and you don't find any blocking issue feel free to approve the MR |
I wants to be clear, I'm not a maintainer of this project and I don't have any right to approve your awesome job. I didn't try it, because I don't frontend developer, I am product owner. |
I think that this can be merged as is. It can always be improved later when we'll gather more feedback from the community. |
@dunglas I think so, because |
Shouldn't we add The code looks good to me! |
So, are there any updates? I have tested it a little bit, everything looks good for me. |
Hi @alOneh, I am looking towards contributing into developing Nuxt JS generator for API Platform, would you please tell me what is left to do to finish this generator? |
Thank you for such a quick response, @alOneh! I will be happy to test this as soon as possible! |
normalizeRelations = x => x, | ||
resolveRelations = x => x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between those?
Am I correct, that I should use them to expand the related items from their iri to the full items?
Is there an example how to use them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, one is for normalize some fields before sending them to the api and the other one is for retrieving some data when having only the iri for an item.
I don't fully implement this cause it could be hard to understand and it relies heavily on the Vuex (you need a store for each relation).
This implementation was inspired by this post, you'll find some examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for the explanation and the link!
[ACTIONS.SET_UPDATED]: (state, updated) => { | ||
Object.assign(state, { | ||
byId: { | ||
[updated['@id']]: updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether it is intended to replace all existing items in byId
after updating one item?
This is a first draft for Nuxt.js client generator, I also use the Vuetify based templates for this generator, I don't know how people use Nuxt.js on their own project but, I have a preference for Vuetify as it is more complete than others but I can keep it simple as I do for the Vue generator.
Feel free to vote on it.