Download next.js/test/production/build-lifecycle-hooks/after.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/build-lifecycle-hooks/after.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/build-lifecycle-hooks/after.ts
-
curl -L -o after.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/build-lifecycle-hooks/after.ts
522 Bytes
| import fs from 'fs/promises' | |
| export async function after({ | |
| distDir, | |
| projectDir, | |
| }: { | |
| distDir: string | |
| projectDir: string | |
| }) { | |
| try { | |
| console.log(`Using distDir: ${distDir}`) | |
| console.log(`Using projectDir: ${projectDir}`) | |
| await new Promise((resolve) => setTimeout(resolve, 5000)) | |
| const files = await fs.readdir(distDir, { recursive: true }) | |
| console.log(`Total files in ${distDir} folder: ${files.length}`) | |
| } catch (err) { | |
| console.error(`Error reading ${distDir} directory:`, err) | |
| } | |
| } | |