Skip to content Skip to sidebar Skip to footer

How To Dynamically Generate Javascript Using Scriptsharp?

I'm looking for a way to dynamically generate javascript. I didn't find any information on this by browsing through Script#'s documentation, so here are my questions: 1) Is it poss

Solution 1:

1) Yes, its possible. The script# compiler is packaged in ScriptSharp.dll and you can use the API it exposes. For an example of doing so, check out the sources of the script# msbuild tasks in the script# repository.

2) When you use the API, you effectively pass in a Stream - so you get the generated content, which you can use as you wish.

I'll recommend cloning the repository and using the "cc" branch to pick up the latest changes. The wiki on github has steps to build. 0.7.5 is a bit old now.

Hope that helps.

Post a Comment for "How To Dynamically Generate Javascript Using Scriptsharp?"