removal redundant comments

This commit is contained in:
Sebastian McKenzie 2015-09-15 06:10:52 +01:00
parent c7130181f7
commit 6e38c037d5

View File

@ -18,20 +18,12 @@ export { version } from "../../package";
import * as t from "babel-types";
export { t as types };
/**
* Register Babel and polyfill globally.
*/
export function register(opts?: Object) {
var callback = require("./register/node-polyfill");
if (opts != null) callback(opts);
return callback;
}
/**
* Asynchronously transform `filename` with optional `opts`, calls `callback` when complete.
*/
export function transformFile(filename: string, opts?: Object, callback: Function) {
if (isFunction(opts)) {
callback = opts;
@ -55,19 +47,11 @@ export function transformFile(filename: string, opts?: Object, callback: Functio
});
}
/**
* Synchronous form of `transformFile`.
*/
export function transformFileSync(filename: string, opts?: Object = {}) {
opts.filename = filename;
return transform(fs.readFileSync(filename, "utf8"), opts);
}
/**
* Parse script with Babel's parser.
*/
export function parse(code, opts = {}) {
opts.allowHashBang = true;
opts.sourceType = "module";