Created
December 2, 2017 17:02
-
-
Save erasmo-marin/3d5033ef4e82f19418565d5239b7e980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fsPath from "fs-path"; | |
const saveUrlToFile = ({ html = "", pathName = "/", output = "." }) => { | |
const path = pathName == "/" | |
? `${output}/index.html` | |
: `${output}${pathName}.html`; | |
fsPath.writeFile(path, html, err => { | |
if (err) { | |
throw err; | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment