This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-console */ | |
import getFolderSize from 'get-folder-size'; | |
async function checkCost() { | |
const myFolder = 'dist'; // your prod assets folder: can be folder or zip file | |
const size = await getFolderSize.loose(myFolder); | |
console.log(`The project is ${size} bytes large`); | |
console.log(`Cost: ${675 * size * 10 * (1 / 1000000000)}Eth at 10Gwei`); | |
console.log(`Cost: ${675 * size * 50 * (1 / 1000000000)}Eth at 50Gwei`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "mock package.json project", | |
... | |
"scripts": { | |
"screenshots": "node screenshots.mjs" | |
}, | |
... | |
"devDependencies": { | |
"puppeteer": "^10.1.0" | |
} |