From aebf18fde516125896f11bf78dd666076c79d165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Thu, 13 Oct 2016 15:53:39 -0400 Subject: [PATCH] task: build require.js test fixture with [].join instead of str replace --- tasks/pretest.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tasks/pretest.js b/tasks/pretest.js index 83be5a8fcb6..69843c698c1 100644 --- a/tasks/pretest.js +++ b/tasks/pretest.js @@ -55,9 +55,13 @@ function makeTestImageFolders() { // Make script file that define plotly in a RequireJS context function makeRequireJSFixture() { - var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8'), - template = 'define(\'plotly\', function(require, exports, module) { {{bundle}} });', - index = template.replace('{{bundle}}', bundle); + var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8'); + + var index = [ + 'define(\'plotly\', function(require, exports, module) {', + bundle, + '});' + ].join(''); common.writeFile(constants.pathToRequireJSFixture, index); logger('make build/requirejs_fixture.js');