Add browser versions of the transform files.

This commit is contained in:
Logan Smyth
2017-10-01 23:23:47 -07:00
parent eae76e5b89
commit f02e6847cf
3 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
// @flow
import type { FileResult } from "./transformation";
export default function transformFile(
filename: string,
opts?: Object = {},
callback: (?Error, FileResult | null) => void,
) {
if (typeof opts === "function") {
callback = opts;
}
callback(new Error("Transforming files is not supported in browsers"), null);
}

View File

@@ -0,0 +1,5 @@
// @flow
export default function transformFileSync() {
throw new Error("Transforming files is not supported in browsers");
}