Skip to content

Commit

Permalink
Revert "More optimizations and fix for JSXTransformer build"
Browse files Browse the repository at this point in the history
This reverts commit f1b7db9.
  • Loading branch information
benjamn committed Feb 4, 2014
1 parent e994e06 commit 77c53dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions grunt/config/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

'use strict';

var deamdify = require('deamdify');
var envify = require('envify/custom');
var grunt = require('grunt');
var UglifyJS = require('uglify-js');
Expand Down Expand Up @@ -81,7 +80,6 @@ var transformer = {
outfile: './build/JSXTransformer.js',
debug: false,
standalone: 'JSXTransformer',
transforms: [deamdify],
after: [simpleBannerify]
};

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"devDependencies": {
"benchmark": "~1.0.0",
"coverify": "~1.0.4",
"deamdify": "~0.1.1",
"envify": "~1.0.1",
"es5-shim": "~2.3.0",
"grunt": "~0.4.2",
Expand All @@ -60,7 +59,7 @@
"phantomjs": "~1.9",
"platform": "~1.0.0",
"populist": "~0.1.6",
"pure-cjs": "~1.8.3",
"pure-cjs": "~1.8.0",
"recast": "~0.5.6",
"sauce-tunnel": "~1.1.0",
"semver": "~2.2.1",
Expand Down
7 changes: 2 additions & 5 deletions vendor/browser-transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
var runScripts;
var headEl;

var buffer = require('buffer');
var transform = require('jstransform').transform;
var visitors = require('./fbtransform/visitors').transformVisitors;
var docblock = require('jstransform/src/docblock');
Expand Down Expand Up @@ -96,10 +97,6 @@ var transformCode = function(code, source) {
throw e;
}

if (typeof btoa === 'undefined') {
return transformed.code;
}

var map = transformed.sourceMap.toJSON();
if (source == null) {
source = "Inline JSX script";
Expand All @@ -114,7 +111,7 @@ var transformCode = function(code, source) {
return (
transformed.code +
'//# sourceMappingURL=data:application/json;base64,' +
btoa(unescape(encodeURIComponent(JSON.stringify(map))))
buffer.Buffer(JSON.stringify(map)).toString('base64')
);
} else {
return code;
Expand Down

0 comments on commit 77c53dd

Please sign in to comment.