Skip to content

Commit 4093281

Browse files
Indrani SonawaneIndrani Sonawane
authored andcommitted
Merge remote-tracking branch '38951/fix-for-issue-38837' into augcommpr
2 parents 4e2dbed + 47f33d1 commit 4093281

File tree

1 file changed

+44
-45
lines changed

1 file changed

+44
-45
lines changed

dev/tools/grunt/configs/less.js

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,49 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
'use strict';
6+
(function () {
7+
'use strict';
8+
var combo = require('./combo'),
9+
themes = require('../tools/files-router').get('themes'),
10+
_ = require('underscore'),
11+
themeOptions = {},
12+
lessOptions = {
13+
options: {
14+
sourceMap: true,
15+
strictImports: false,
16+
sourceMapRootpath: '/',
17+
sourceMapBasepath: function () {
18+
this.sourceMapURL = this.sourceMapFilename.substr(this.sourceMapFilename.lastIndexOf('/') + 1);
19+
return 'pub/';
20+
},
21+
dumpLineNumbers: false, // use 'comments' instead false to output line comments for source
22+
ieCompat: false
23+
},
24+
setup: {
25+
files: {
26+
'<%= path.css.setup %>/setup.css': '<%= path.less.setup %>/_setup.less'
27+
}
28+
},
29+
updater: {
30+
files: {
31+
'<%= path.css.updater %>/updater.css': '<%= path.less.setup %>/_setup.less'
32+
}
33+
},
34+
documentation: {
35+
files: {
36+
'<%= path.doc %>/docs.css': '<%= path.doc %>/source/docs.less'
37+
}
38+
}
39+
};
740

8-
var combo = require('./combo'),
9-
themes = require('../tools/files-router').get('themes'),
10-
_ = require('underscore');
41+
_.each(themes, function (theme, name) {
42+
themeOptions[name] = {
43+
files: combo.lessFiles(name)
44+
};
45+
});
1146

12-
var themeOptions = {};
13-
14-
_.each(themes, function(theme, name) {
15-
themeOptions[name] = {
16-
files: combo.lessFiles(name)
17-
};
18-
});
19-
20-
var lessOptions = {
21-
options: {
22-
sourceMap: true,
23-
strictImports: false,
24-
sourceMapRootpath: '/',
25-
sourceMapBasepath: function (f) {
26-
this.sourceMapURL = this.sourceMapFilename.substr(this.sourceMapFilename.lastIndexOf('/') + 1);
27-
return "/";
28-
},
29-
dumpLineNumbers: false, // use 'comments' instead false to output line comments for source
30-
ieCompat: false
31-
},
32-
setup: {
33-
files: {
34-
'<%= path.css.setup %>/setup.css': '<%= path.less.setup %>/_setup.less'
35-
}
36-
},
37-
updater: {
38-
files: {
39-
'<%= path.css.updater %>/updater.css': '<%= path.less.setup %>/_setup.less'
40-
}
41-
},
42-
documentation: {
43-
files: {
44-
'<%= path.doc %>/docs.css': '<%= path.doc %>/source/docs.less'
45-
}
46-
}
47-
};
48-
49-
/**
50-
* Compiles Less to CSS and generates necessary files if requested.
51-
*/
52-
module.exports = _.extend(themeOptions, lessOptions);
47+
/**
48+
* Compiles Less to CSS and generates necessary files if requested.
49+
*/
50+
module.exports = _.extend(themeOptions, lessOptions);
51+
})();

0 commit comments

Comments
 (0)