Skip to content

Commit 5c8fc68

Browse files
committed
CE-32850: Fixed grunt and jasmine for using underscore from node_modules
1 parent fed94bf commit 5c8fc68

File tree

8 files changed

+8
-29
lines changed

8 files changed

+8
-29
lines changed

dev/tests/js/jasmine/spec_runner/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
'use strict';
77

88
var tasks = [],
9-
_ = require('underscore'),
10-
root = typeof self == 'object' && self.self === self && self ||
11-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
12-
root._ = _;
9+
_ = require('underscore');
1310

1411
function init(grunt, options) {
1512
var _ = require('underscore'),

dev/tests/js/jasmine/spec_runner/tasks/jasmine.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
'use strict';
77

88
var tasks = {},
9-
_ = require('underscore'),
10-
root = typeof self == 'object' && self.self === self && self ||
11-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
12-
root._ = _;
9+
_ = require('underscore');
1310

1411
function init(config) {
1512
var grunt = require('grunt'),

dev/tools/grunt/configs/clean.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
'use strict';
77

88
var themes = require('../tools/files-router').get('themes'),
9-
_ = require('underscore'),
10-
root = typeof self == 'object' && self.self === self && self ||
11-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
12-
root._ = _;
9+
_ = require('underscore');
1310

1411
var themeOptions = {};
1512

dev/tools/grunt/configs/exec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
var combo = require('./combo'),
99
themes = require('../tools/files-router').get('themes'),
10-
_ = require('underscore'),
11-
root = typeof self == 'object' && self.self === self && self ||
12-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
13-
root._ = _;
10+
_ = require('underscore');
1411

1512
var themeOptions = {};
1613

dev/tools/grunt/configs/less.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
var combo = require('./combo'),
99
themes = require('../tools/files-router').get('themes'),
10-
_ = require('underscore'),
11-
root = typeof self == 'object' && self.self === self && self ||
12-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
13-
root._ = _;
10+
_ = require('underscore');
1411

1512
var themeOptions = {};
1613

dev/tools/grunt/configs/watch.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
var combo = require('./combo'),
99
themes = require('../tools/files-router').get('themes'),
10-
_ = require('underscore'),
11-
root = typeof self == 'object' && self.self === self && self ||
12-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
13-
root._ = _;
10+
_ = require('underscore');
1411

1512
var themeOptions = {};
1613

dev/tools/grunt/tasks/mage-minify.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ module.exports = function (grunt) {
66
'use strict';
77

88
var compressor = require('node-minify'),
9-
_ = require('underscore'),
10-
root = typeof self == 'object' && self.self === self && self ||
11-
typeof global == 'object' && global.global === global && global || Function('return this')() || {};
12-
root._ = _;
9+
_ = require('underscore');
1310

1411
/**
1512
* Helper function used to create config object for compressor.

package.json.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
"squirejs": "~0.2.1",
3838
"strip-json-comments": "~2.0.1",
3939
"time-grunt": "~1.4.0",
40-
"underscore": "~1.8.0"
40+
"underscore": "^1.13.1"
4141
}
4242
}

0 commit comments

Comments
 (0)