Recommended workflow
Cheerp in itself has no dependencies, but the recommended workflow and the tutorials make use of:
- a command line prompt
- a JavaScript engine
- an Http server
- a browser
How to have everything up and running (useful not just for Cheerp but also generally) in your developer environment of choice?
Command line prompt
On Linux or Mac OS X, open the Terminal of your choice. On Windows, you can use the command prompt (Start - type ‘cmd’) or PowerShell (Start - type ‘powershell’).
For the purpose of the tutorials, the main cosmetic difference between running in a Unix command line and a Windows command line is the \
vs /
. Use the one your system impose.
A JavaScript engine
We will use node.js for simplicity, but Cheerp is completely independent and strive to work with a range as wide as reasonable of JavaScript implementations
Node.js installation instructions
Linux users could either install from source or use a packet manager for their distribution.
Windows and macOS users can direcly download from the official website.
Whatever the case running nodejs --version
from the command line should confirm whether it’s installed properly or not.
An http server
Since you have already Nodejs (right?), using Nodejs packet manager npm
it’s easy to install the appropiately named http-server
package.
Visit its website, and then install it with:
npm install http-server -g
And then test it with:
http-server -o
Other http servers will also work, just change http-server to invoke your preferred solution.
A browser
Firefox or any browser from the Chrome-family offer good support of the JavaScript and Wasm standards and great development tools (to inspect the code, trace memory usage or debugging bugs). They shine in different things, and are available in any environment. But any web-browser that comes with your system will do.
Knowing how to launch it from command line could be useful, for example firefox file.html
opens file.html
in a new tab.