mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
12 lines
361 B
TypeScript
12 lines
361 B
TypeScript
import fs from 'fs'
|
|
import {promisify} from 'util'
|
|
import {join} from 'path'
|
|
import {BUILD_ID_FILE} from 'next-server/constants'
|
|
|
|
const writeFile = promisify(fs.writeFile)
|
|
|
|
export async function writeBuildId (distDir: string, buildId: string): Promise<void> {
|
|
const buildIdPath = join(distDir, BUILD_ID_FILE)
|
|
await writeFile(buildIdPath, buildId, 'utf8')
|
|
}
|