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
- Edit the index.html file to fit your needs
- Compile the file
Using options
npm run build
npm run build index.html output.h app
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.