in Knockout Generator

Knockout Generator 1.3

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0Email this to someone

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.

CamelCase

options-camelcase
PascalCase

options-pascalcase

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”

selection-generation

The options window will open up, (with the selection you made).
options-selection

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!

 

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0Email this to someone

Write a Comment

Comment

    • Just upgraded it so it’s now supporting vs2013 and vs2012! Tell me if you find anything wrong with it! Glad that you like it! :]

  1. Thankyou, really great tool!

    Would also be great if it could output knockout validation extends based on the .NET data annotations.