Download wp-calypso/bin/icfy-analyze.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/bin/icfy-analyze.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/bin/icfy-analyze.js
-
curl -L -o icfy-analyze.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/bin/icfy-analyze.js
569 Bytes
| const { writeFileSync } = require( 'fs' ); | |
| const { getViewerData, readStatsFromFile } = require( 'webpack-bundle-analyzer/lib/analyzer' ); | |
| analyzeBundle(); | |
| async function analyzeBundle() { | |
| console.log( 'Analyze: reading stats.json file' ); | |
| const stats = await readStatsFromFile( 'client/stats.json' ); | |
| console.log( 'Analyze: analyzing' ); | |
| const chart = getViewerData( stats, './public/evergreen' ); | |
| console.log( 'Analyze: writing chart.json file' ); | |
| writeFileSync( 'client/chart.json', JSON.stringify( chart, null, 2 ) ); | |
| console.log( 'Analyze: finished' ); | |
| } | |