开发者

What should I use to create a cross-platform cmd tool for JavaScript developers

开发者 https://www.devze.com 2023-02-04 07:09 出处:网络
I am writing a JavaScript API and I have come to a situation where I would need to create command line commands for developers to use. However, I am not sure how should I do开发者_高级运维 it (Powersh

I am writing a JavaScript API and I have come to a situation where I would need to create command line commands for developers to use. However, I am not sure how should I do开发者_高级运维 it (Powershell vs Bash), maybe using Java or C#?

If you are making a JavaScript library, what technology would you use for command line tools?


Why not use Javascript itself, since your API already uses it?

On *NIX systems, there are tools such as jsc that allow you to evaluate Javascript code from the command line. And of course, Windows has cscript.


It would be perfect to use JS to create command line tools, since all your project will be in JS. One way to do it is to compile Google V8 JS engine.

Another common language for CL tools is Python. It is also scripting and portable language.

0

精彩评论

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

关注公众号