mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2025-01-05 12:57:33 +03:00
Use some fsPromises functions.
This commit is contained in:
parent
cf58268c23
commit
2864cfcc58
@ -230,9 +230,11 @@ async function runTerser(filePath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function copyAssets() {
|
async function copyAssets() {
|
||||||
fs.writeFile(
|
await fsPromises.writeFile(
|
||||||
"dist/elm-pages.js",
|
"dist/elm-pages.js",
|
||||||
fs.readFileSync(path.join(__dirname, "../static-code/elm-pages.js"))
|
await fsPromises.readFile(
|
||||||
|
path.join(__dirname, "../static-code/elm-pages.js")
|
||||||
|
)
|
||||||
);
|
);
|
||||||
fs.copyDirFlat("public", "dist");
|
fs.copyDirFlat("public", "dist");
|
||||||
}
|
}
|
||||||
@ -245,8 +247,8 @@ async function compileCliApp(options) {
|
|||||||
"./elm-stuff/elm-pages"
|
"./elm-stuff/elm-pages"
|
||||||
);
|
);
|
||||||
|
|
||||||
const elmFileContent = await fs.readFile(ELM_FILE_PATH, "utf-8");
|
const elmFileContent = await fsPromises.readFile(ELM_FILE_PATH, "utf-8");
|
||||||
await fs.writeFile(
|
await fsPromises.writeFile(
|
||||||
ELM_FILE_PATH,
|
ELM_FILE_PATH,
|
||||||
elmFileContent
|
elmFileContent
|
||||||
.replace(
|
.replace(
|
||||||
|
Loading…
Reference in New Issue
Block a user