Skip to content

Commit 782eeef

Browse files
bnjmnt4nmathiasbynens
authored andcommitted
Fix issues with the generated file
Fixes #1.
1 parent 516caf9 commit 782eeef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ gulp.task('js', function() {
5353
'(function(){var _,platform;',
5454
'}.call(this))'
5555
))
56+
.pipe(replace('root.platform = parse()', 'platform = parse()'))
57+
.pipe(replace('var _ = runInContext()', '_ = runInContext()'))
58+
.pipe(replace('(freeWindow || freeSelf || {})._ = _', ''))
59+
.pipe(replace('root._ = _', ''))
60+
61+
// Ensure that Benchmark.js uses the local copies of lodash and Platform.js.
62+
.pipe(replace('var _ = context && context._ || req(\'lodash\') || root._;', ''))
63+
.pipe(replace('\'platform\': context.platform', '\'platform\': platform'))
5664

5765
// Minify the result.
5866
//.pipe(uglify())

0 commit comments

Comments
 (0)