Make sure you have “Node.js” installed and run the following command:
1 | # Create a directory and run the following command |
Then you should be able to run it such as:
1 | # Indicate the browser application location with the "--browser-executable-path" argument. |
Note that, to run the commands above, you need to have “chrome” or “chromium” installed, and set the application location in the command.
For Firefox, I didn’t get a command to run successfully, even with the web driver. Here is the content I tried.
If you don’t want to use browser, you can use WebDriver instead, such as “geckodriver“. Download it from here. The command looks like below:
1 | npx single-file https://github.com/gildas-lormeau/single-file-cli single-file-cli.html \ |
Download “webdriver-chromium” from here.
1 | npx single-file https://github.com/gildas-lormeau/single-file-cli single-file-cli.html \ |