chore: remove output-file-sync dependency (#10619)

This commit is contained in:
Huáng Jùnliàng
2019-10-31 14:51:36 -04:00
committed by Brian Ng
parent 0b0edc3e3d
commit a2b5437b01
5 changed files with 18 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
// @flow
import defaults from "lodash/defaults";
import outputFileSync from "output-file-sync";
import { sync as makeDirSync } from "make-dir";
import slash from "slash";
import path from "path";
@@ -10,6 +9,11 @@ import fs from "fs";
import * as util from "./util";
import { type CmdOptions } from "./options";
function outputFileSync(filePath: string, data: string | Buffer): void {
makeDirSync(path.dirname(filePath));
fs.writeFileSync(filePath, data);
}
export default async function({
cliOptions,
babelOptions,