@samitouri / QOS-React-2 / commits / 82f211f6b8

revert muffinize :(

petehunt committed Dec 2, 2013 at 12:38 UTC 82f211f6b861ff88dedef407c47a634661b67d12
1 file changed +5 -22
grunt/config/browserify.js
+5 -22
@@ -5,7 +5,6 @@
5
6 var envify = require('envify/custom');
7 var grunt = require('grunt');
8 -var recast = require('recast');
8 var UglifyJS = require('uglify-js');
9
10 var SIMPLE_TEMPLATE =
@@ -36,22 +35,6 @@ function minify(src) {
35 return UglifyJS.minify(src, { fromString: true }).code;
36 }
37
39 -// Muffinize: replace the word "require" with "muffin" to
40 -// allow browserified libraries to work with requirejs and
41 -// other pacakgers that get confused by these calls.
42 -function muffinize(src) {
43 - return recast.print(
44 - recast.types.traverse(recast.parse(src), muffinizeVisitor)
45 - );
46 -}
47 -
48 -function muffinizeVisitor(node, traverse) {
49 - if (recast.namedTypes.Identifier.check(node) &&
50 - node.name === 'require') {
51 - node.name = 'muffin';
52 - }
53 -}
54 -
38 // TODO: move this out to another build step maybe.
39 function bannerify(src) {
40 var version = grunt.config.data.pkg.version;
@@ -78,14 +61,14 @@ var basic = {
61 debug: false,
62 standalone: 'React',
63 transforms: [envify({NODE_ENV: 'development'})],
81 - after: [simpleBannerify, muffinize]
64 + after: [simpleBannerify]
65 };
66
67 var min = grunt.util._.merge({}, basic, {
68 outfile: './build/react.min.js',
69 debug: false,
70 transforms: [envify({NODE_ENV: 'production'})],
88 - after: [minify, bannerify, muffinize]
71 + after: [minify, bannerify]
72 });
73
74 var transformer = {
@@ -95,7 +78,7 @@ var transformer = {
78 outfile: './build/JSXTransformer.js',
79 debug: false,
80 standalone: 'JSXTransformer',
98 - after: [simpleBannerify, muffinize]
81 + after: [simpleBannerify]
82 };
83
84 var addons = {
@@ -107,14 +90,14 @@ var addons = {
90 standalone: 'React',
91 transforms: [envify({NODE_ENV: 'development'})],
92 packageName: 'React (with addons)',
110 - after: [simpleBannerify, muffinize]
93 + after: [simpleBannerify]
94 };
95
96 var addonsMin = grunt.util._.merge({}, addons, {
97 outfile: './build/react-with-addons.min.js',
98 debug: false,
99 transforms: [envify({NODE_ENV: 'production'})],
117 - after: [minify, bannerify, muffinize]
100 + after: [minify, bannerify]
101 });
102
103 var withCodeCoverageLogging = {