Simple Nodejs script to convert a html file to a fully Arduino compatible string
The main motivation for this project is to have a simple script that allows you to easily convert your html file into a fully compatible Arduino file.
You need to copy package.json
, compiler.js
and index.html
somewhere in your project
- Install dependecies
npm install
- Change the
build
script underpackage.json
to match your desired output file
- Edit the index.html file to fit your needs
- Compile the file
npm run build
It will generates an output file with the following content:
String app = "your_compiled_html";
Now your can import the created file
#include "output.h"
...
server.send(200, "text/html", app);
Distributed under the MIT License.