1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/packages/next/build/write-build-id.ts
2018-12-03 14:18:52 +01:00

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')
}