mirror of
https://github.com/luc-github/ESP3D.git
synced 2025-10-31 11:56:48 -07:00
Add Script to parse all c/cpp/h/ino files and format them using clang-format with Google style
Update style to some files with clang-format using Google style Add Script to parse all embedded js/css files and format them using prettier based on .prettierrc config file Update style to embedded js/css files with prettier
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
const path = require("path");
|
||||
const { createReadStream, createWriteStream } = require("fs");
|
||||
const { createGzip } = require("zlib");
|
||||
const faviconPath = path.normalize(__dirname + "/../assets/favicon.ico");
|
||||
|
||||
const path = require('path');
|
||||
const { createReadStream, createWriteStream } = require('fs');
|
||||
const { createGzip } = require('zlib');
|
||||
const faviconPath = path.normalize(__dirname + '/../assets/favicon.ico');
|
||||
|
||||
// Create a gzip function for reusable purpose
|
||||
const compressFile = (filePath) => {
|
||||
const stream = createReadStream(filePath);
|
||||
stream
|
||||
.pipe(createGzip())
|
||||
.pipe(createWriteStream(`${filePath}.gz`))
|
||||
.on("finish", () =>console.log(`Successfully compressed the file at ${filePath}`)
|
||||
);
|
||||
const stream = createReadStream(filePath);
|
||||
stream
|
||||
.pipe(createGzip())
|
||||
.pipe(createWriteStream(`${filePath}.gz`))
|
||||
.on('finish', () =>
|
||||
console.log(`Successfully compressed the file at ${filePath}`)
|
||||
);
|
||||
};
|
||||
compressFile(faviconPath);
|
||||
compressFile(faviconPath);
|
||||
|
||||
Reference in New Issue
Block a user