Skip to content

Commit f507382

Browse files
committed
task: build require.js test fixture with [].join instead of str replace
1 parent 0b449f0 commit f507382

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tasks/pretest.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ function makeTestImageFolders() {
5555

5656
// Make script file that define plotly in a RequireJS context
5757
function makeRequireJSFixture() {
58-
var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8'),
59-
template = 'define(\'plotly\', function(require, exports, module) { {{bundle}} });',
60-
index = template.replace('{{bundle}}', bundle);
58+
var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8');
59+
60+
var index = [
61+
'define(\'plotly\', function(require, exports, module) {',
62+
bundle,
63+
'});'
64+
].join('');
6165

6266
common.writeFile(constants.pathToRequireJSFixture, index);
6367
logger('make build/requirejs_fixture.js');

0 commit comments

Comments
 (0)