aplus-babel.js
function transformFile(filepath, options) {
	logger.trace("transforming file - " + filepath);
	var content = fs.readFileSync(filepath, 'utf8');
	var result = transformCode(content, options);
	fs.writeFileSync(filepath, result);
}
function transformFile(filepath, options) {
	logger.trace("transforming file - " + filepath);
	var content = fs.readFileSync(filepath, 'utf8');
	var result = transformCode(content, options);
	fs.writeFileSync(filepath, result);
}
function transformFile ( filepath , options ) { logger . trace ( "transforming file - " + filepath ) ; var content = fs . readFileSync ( filepath , 'utf8' ) ; var result = transformCode ( content , options ) ; fs . writeFileSync ( filepath , result ) ; }
Transform a file with babeljs using babel config

@param {string} filepath - absolute path of the file to be transformed
@param {Object} options - babel configuration object (see http://babeljs.io/docs/usage/options/)
@param {string[]} [options.presets=[]] - List of presets (a set of plugins) to load and use..
@param {string[]} [options.plugins=[]] - List of plugins to load and use.
@param {boolean} [options.babelrc=true] - Specify whether or not to use .babelrc and .babelignore files.
@param {boolean} [options.ast=true] - Include the AST in the returned object
@param {boolean} [options.minified=true] - Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping () from new when safe)
@param {boolean} [options.comments=true] - Output comments in generated output.
@param {Object} [options.env={}] - This is an object of keys that represent different environments. For example, you may have: { env: { production: { someOption: true } } } which will use those options when the enviroment variable BABEL_ENV is set to "production". If BABEL_ENV isn’t set then NODE_ENV will be used, if it’s not set then it defaults to "development"
@param {string} [options.extends=null] - A path to an .babelrc file to extend
Transform a file with babeljs using babel config