To install these packages run the following command
npm i -g jsvu eshost
||✅||✅ *||✅ *||✅||✅|
||✅ (32)||✅||✅ (32)||✅||✅|
When you first run it it will prompt you to select the JS engines to install. After initial install running the
jsvu commannd will update the engines as appropriate.
Once we have the engines that we want to work with we can configure
ESHost to run the same command with these multiple js engines. In this example, we’re adding the major browser’s JS engines to work with ESHost.
Once we have the engines set up, ESHost is ready to go.
We have multiple ways to run scripts in ESHost. We can run a short script in all configured browsers with the
-e flag like this:
eshost -e "12*12"
You can also run complete scripts in the configured browsers with the following command:
The only flags I will refer to are
-m flag will treat the script as a module with the corresponding differences in syntax.
-s flag will consolidate results when different engines produce the same result. For example, the following command:
eshost -se "console.log(112*12)"
For more information use the following command: