1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00

minor fix

This commit is contained in:
ido 2015-10-25 12:55:01 +02:00
parent 88ce4a3326
commit dbf3dbf21e

@ -545,15 +545,15 @@ function convertRT(html, reportContext, options) {
var buildImport;
if (options.modules === 'typescript') {
buildImport = function (reqVar, reqPath) {
return 'import ' + reqVar + " = require('" + reqPath + "');";
return util.format("import %s = require('%s');", reqVar, reqPath);
};
} else if (options.modules === 'es6') {
buildImport = function (reqVar, reqPath) {
return 'import ' + reqVar + " from '" + reqPath + "';";
return util.format("import %s from '%s';", reqVar, reqPath);
};
} else {
buildImport = function (reqVar, reqPath) {
return 'var ' + reqVar + " = require('" + reqPath + "');";
return util.format("var %s = require('%s');", reqVar, reqPath);
};
}
var vars = _(defines).map(buildImport).join('\n');