Just a few days ago I released the 1.2 version of Knockout Generator. I got about 40 downloads in just 1 day, and got really excited from the feedback so I started developing a new version with some new features.
Last update I told you I was going to do:
- An option that lets you have camelcase properties or not;
- Selection from a class and generate only the selection;
- Save a new file with the content where the user likes
In this release I can proudly present 2 out of 3.
The first one is two new Radiobuttons, that lets you choose wether you want camelcasing or pascalcasing on your properties.
I also added selection generation. The class/classes you select will only be the one/onse to be generated.
So, let’s watch some demos.
Pretty easy, a class with some properties, choosing to generate a knockout viewmodel from it
The options window opens up, and there is now 2 new Radiobuttons in the top (CamelCasing and PascalCasing). CamelCasing is by default checked, and if you choose to check PascalCasing instead, you will see in the preview that all your properties will not be defined with CamelCasing anymore.
The second feature I added in this release is the selection generation, when you have multiple classes in a file, you might only want to generate one class. So here is how this works:
Select a class, right click and select ”Generate Knockout ViewModel”
Choose wether you want CamelCasing or PascalCasing, which properties to ignore and which ones should be observable, click ”Copy to clipboard” and you are done!
This is one of my favorites so far! A really neat function that I hope more will appreciate!
For the next releas I will work on:
- Base classes properties to be inherited
- Save a new file with the content
What else do you miss in this Visual Studio extension? Tell me what you think at Twitter angustafsson or here in the comment field below!