开发者

Library to write javascript code

开发者 https://www.devze.com 2022-12-23 23:43 出处:网络
Is there a c# library that can help to write and indent Javascript code. It\'s because I\'m writing some c# code that generated some Javascript code. Something like this :

Is there a c# library that can help to write and indent Javascript code.

It's because I'm writing some c# code that generated some Javascript code. Something like this :

js += "<s开发者_JS百科cript type=\"text/javascript\">\n";
js += "   function()...\n";

And I find that generated a lot of ugly code.

So, I thought that maybe a existing library can help me doing that ?


I just found this.

http://projects.nikhilk.net/ScriptSharp


ScriptSharp looks interesting but has a fairly high learning curve.

I wrote this a long time ago which is simple and was popular at the time (which amused me because I wrote it to simplify some other articles rather than as an article in its own right). Don't know how well it stands up nowadays though; I haven't used it in a long time. I prefer to keep scripts out in their own files now.

0

精彩评论

暂无评论...
验证码 换一张
取 消