Add README.md
This commit is contained in:
6
app.js
6
app.js
@@ -17,8 +17,10 @@
|
||||
const fs = require('fs');
|
||||
const zlib = require('zlib');
|
||||
|
||||
const input = fs.createReadStream('style.css'); // Replace 'yourfile.js' with the name of your JS file
|
||||
const output = fs.createWriteStream('style.css.gzip'); // The output will be 'yourfile.js.gz'
|
||||
const fileName = "style.css";
|
||||
|
||||
const input = fs.createReadStream(fileName); // Replace 'yourfile.js' with the name of your JS file
|
||||
const output = fs.createWriteStream(`${fileName}.gzip`); // The output will be 'yourfile.js.gz'
|
||||
|
||||
input.pipe(zlib.createGzip()).pipe(output);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user