-
Notifications
You must be signed in to change notification settings - Fork 533
Toward vuejs v2.0 #89
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
@@ -1,5 +1,5 @@ | |||
{ | |||
"presets": ["es2015", "stage-0"], | |||
"presets": ["es2015", "stage-2"], | |||
"plugins": ["transform-runtime"], |
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.
Why changed to stage-2 from 0?
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.
stage-2 is the default in the vue-cli webpack preset. It is less bleeding edge, I guess ? I don't mind putting it back to were it was, I just did that when I was debugging to exclude differences between your config and the proposed webpack config.
You use ES7 features ?
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.
Currently not, just I'm using stage-0 in my other projects too.
|
||
if (isFunction(this.schema.set)) { | ||
this.schema.set(this.model, newValue); | ||
console.log("model-updated via schema", this.model[this.schema.model]); |
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.
Not guaranteed, that this.schema.model is defined. Need to check
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.
BTW, what is this schema.set
? I might have missed it, but I don't recall any explanation about it in the doc.
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.
The set
and get
in schema can be use for virtual props of model. E.g create a field for fullName but in the model store as firstName
and lastName
.
{
type: "text",
label: "Full name",
model: null,
get(model) {
return model.firstName + " " + model.lastName;
},
set(model, val) {
let values = val.split(" ");
model.firstName = values[0];
model.lastName = values[1];
}
}
Or if you want to transform the value. Example
"test": /\.jade?$/, | ||
"loader": "jade" | ||
}, | ||
{ |
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.
In Vue2 these loaders not neccessary?
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.
Well, we don't require any .jade
, .scss
or .css
files. They were never necessary (vue-loader take care of this).
It is also part of my temporary debug changes.
It can came back when everything is working again.
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.
Hmm, you are right. It's a habit :)
|
||
// console.log(el); | ||
|
||
return [el, vm]; | ||
} | ||
|
||
describe("VueFormGenerator.vue", () => { | ||
|
||
describe.only("nothing", () => { |
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.
It's misleading, because Travis will be green, but no correct testing. In development state there is no problem if Travis red, but show the real results and we know we need to fix it too. 😉
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.
Sorry about that, it was to test the build locally without changing too much. Normally, it is forbidden to push .only()
. This will go away when I fix the test. I forget to put it back how it was.
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
Hi, are you working on this upgrade yet? |
@icebob Sorry I was very busy at work. I will work on it soon. |
Add missing opening brace
@lionel-bijaoui Do you have any new commit to this PR? |
I'm sorry, I'm really squeezed tight at work. I'm not in my normal office and I'm not doing any dev work. It's kinda special for me for the next 2 months. |
Thanks, no problem! Just upload your last state and I continue to migration. 😉 |
# Conflicts: # dev/index.html # src/formGenerator.vue
…-template-compiler). Update vue-loader to 10.0.0.
I updated vuejs and integrated all the new changes since the last push. The main problem is the validator that is validating too early. I don't know if it has access to the values or not. |
Thank you! |
🚧 This is WIP 🚧
current problem by order of importance:
Project board : https://github.com/icebob/vue-form-generator/projects/2