New JavaScript Plugin

Topics: Developer Forum
Feb 7, 2012 at 7:15 AM

I've been looking through the SHFB source code with the intent of creating an alternative to the AjaxDoc plugin. One that will work with any generic JavaScript, not just Microsoft AJAX (nee Atlas) libraries and supports the latest VSDoc syntax (i.e. <signature>). I also want it to work without requiring a web server and with a lot less configuration.

I've got the VSDoc extraction working more-or-less using phantomjs. It passes back the reflection data as JSON to a C# library to be transformed into XML.

So I guess my question is, how flexible is the plugin model in SHFB? Could I make a completely standalone plugin with it's own installer, or would it need to be bundled with SHFB? If it's the later, how open are you to other developers contributing code? Is including a tool like phantomjs (BSD license) even an option?

Thanks in advance!

Feb 7, 2012 at 8:01 PM

Yes, you can create a standalone plug-in with your own installer if you want to manage the project independently of SHFB.  See the topics in the help file on creating plug-ins and on the special folder locations as it will give you the necessary information on how to create them and where to put them so that SHFB finds them.  Several people have done this already.  The XML Schema Documenter here on CodePlex is one example.

I'm open to having code contributed to the project as long as it's compatible with the Ms-PL license used by SHFB but typically don't include standalone third-party tools (i.e. AjaxDoc, the SBAppLocale.exe tool, etc).  Since they are used by plug-ins, I prefer that they are downloaded and installed by people that need to use the plug-in rather than adding stuff to the SHFB install that people may never use.  In such cases, the plug-in should contain the necessary configuration options so that it can be told where to find the related tools.  It also depends on what the plug-in does and whether or not I can properly support it.  This may be a case where I can't as I'm not that familiar with the additional tools, JSON, etc.



Feb 7, 2012 at 8:41 PM

Great answer, thanks Eric!

I think a standalone plugin sounds like the right approach. I'll take a look at XML Schema Documenter and the SHFB plugin documentation and get started.

I've worked on Ms-PL projects that use phantom before (see Chutzpah), so I'm confident they can co-exist.

Thanks again, Ben

Feb 29, 2012 at 9:37 PM

And thus, SandScript is born :)

It's going to take me a while to get through all the nuts and bolts of building valid reflection xml that works with Sandcastle, but I think it'll be worth it once I get there.

Mar 1, 2012 at 1:58 AM

Looks promising.  Please keep us updated on your progress.