Skip to content

Commit

Permalink
Cleanup app-data
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Mar 9, 2020
1 parent 7771e56 commit c095a12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/gatsby/src/utils/app-data.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import fs from "fs-extra"
import path from "path"

import { outputJson, pathExistsSync } from "fs-extra"

const APP_DATA_JSON = `app-data.json`

export const write = (publicDir: string, hash: string): void => {
fs.outputJson(path.join(publicDir, `page-data`, APP_DATA_JSON), {
export const write = (publicDir: string, hash: string): Promise<void> =>
outputJson(path.join(publicDir, `page-data`, APP_DATA_JSON), {
webpackCompilationHash: hash,
})
}

export const exists = (publicDir: string): boolean =>
fs.pathExistsSync(path.join(publicDir, `page-data`, APP_DATA_JSON))
pathExistsSync(path.join(publicDir, `page-data`, APP_DATA_JSON))

0 comments on commit c095a12

Please sign in to comment.