Skip to content

Commit

Permalink
remove exports.react
Browse files Browse the repository at this point in the history
  • Loading branch information
benpptung committed Nov 26, 2019
1 parent c7cd95f commit bd76155
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,19 +490,19 @@ exports.cssByContent = function (content, options, callback) {
* @param codes
* @param callback
*/
exports.react = function (codes, callback) {

try {
// react 1.0 will be in favor in babel
// codes = reactTools.transform(codes);
codes = babel.transform(codes).code;
}
catch (err) { callback(err); }

callback(null, codes);
};

var concat_hook_react = async.seq(fs.readFile, exports.react);
// exports.react = function (codes, callback) {
//
// try {
// // react 1.0 will be in favor in babel
// // codes = reactTools.transform(codes);
// // codes = babel.transform(codes).code;
// }
// catch (err) { callback(err); }
//
// callback(null, codes);
// };

// var concat_hook_react = async.seq(fs.readFile, exports.react);

/**
* transform all enhanced js codes to javascript
Expand Down Expand Up @@ -682,4 +682,4 @@ var pretty_ms = function (ms) {

if (ms < 1000) return (ms + 'ms').white;
return (( Math.round(ms / 100) / 10 ) + 's' ).white;
};
};

0 comments on commit bd76155

Please sign in to comment.