Break apart the File class into multiple files and add type definitions.

This commit is contained in:
Logan Smyth
2017-09-29 18:18:44 -07:00
parent c1df126b83
commit eae76e5b89
19 changed files with 676 additions and 619 deletions

View File

@@ -0,0 +1,13 @@
// @flow
import loadConfig from "./config";
import runTransform, { type FileResult } from "./transformation";
export default function transform(
code: string,
opts?: Object,
): FileResult | null {
const config = loadConfig(opts);
if (config === null) return null;
return runTransform(config, code);
}