Skip to content

Commit 2139e3b

Browse files
author
Natalia Momotenko
committed
Merge remote-tracking branch 'origin/MAGETWO-37091' into UI
2 parents d33b89c + 72031c7 commit 2139e3b

File tree

4 files changed

+33
-39
lines changed

4 files changed

+33
-39
lines changed

Gruntfile.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ module.exports = function (grunt) {
2323
require('load-grunt-config')(grunt, {
2424
configPath: path.join(__dirname, configDir),
2525
init: true,
26-
loadGruntTasks: {
27-
pattern: [
28-
'grunt-*'
29-
]
26+
jitGrunt: {
27+
staticMappings: {
28+
usebanner: 'grunt-banner'
29+
}
3030
}
3131
});
3232

3333
_.each({
3434
/**
3535
* Assembling tasks.
36-
* ToDo UI: define default tasks.
36+
* ToDo: define default tasks.
3737
*/
3838
default: function () {
3939
grunt.log.subhead('I\'m default task and at the moment I\'m empty, sorry :/');
@@ -43,17 +43,19 @@ module.exports = function (grunt) {
4343
* Production preparation task.
4444
*/
4545
prod: function (component) {
46-
if (component === 'setup') {
47-
grunt.task.run([
48-
'less:' + component,
49-
'autoprefixer:' + component,
50-
'cssmin:' + component,
51-
'usebanner:' + component
52-
]);
53-
}
46+
var tasks = [
47+
'less',
48+
'autoprefixer',
49+
'cssmin',
50+
'usebanner'
51+
].map(function(task){
52+
return task + ':' + component;
53+
});
5454

5555
if (typeof component === 'undefined') {
5656
grunt.log.subhead('Tip: Please make sure that u specify prod subtask. By default prod task do nothing');
57+
} else {
58+
grunt.task.run(tasks);
5759
}
5860
},
5961

dev/tools/grunt/configs/banner.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

dev/tools/grunt/configs/usebanner.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,22 @@
55

66
'use strict';
77

8-
var banner = require('./banner');
8+
var banner = {
9+
firstLine: 'Copyright © 2015 Magento. All rights reserved.',
10+
secondLine: 'See COPYING.txt for license details.',
11+
12+
css: function () {
13+
return '/**\n * ' + this.firstLine + '\n * ' + this.secondLine + '\n */\n';
14+
},
15+
16+
less: function () {
17+
return '// /**\n// * ' + this.firstLine + '\n// * ' + this.secondLine + '\n// */\n';
18+
},
19+
20+
html: function () {
21+
return '<!--\n/**\n * ' + this.firstLine + '\n * ' + this.secondLine + '\n */\n-->\n';
22+
}
23+
};
924

1025
module.exports = {
1126
options: {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Magento2",
33
"author": "Magento, an eBay Inc. company",
44
"description": "Magento2 node modules dependencies for local development",
5-
"version": "0.42.0-beta1",
5+
"version": "0.74.0-beta7",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/magento/magento2.git"
@@ -11,7 +11,7 @@
1111
"devDependencies": {
1212
"grunt": "^0.4.5",
1313
"grunt-autoprefixer": "^2.0.0",
14-
"grunt-banner": "^0.3.1",
14+
"grunt-banner": "^0.4.0",
1515
"grunt-contrib-clean": "^0.6.0",
1616
"grunt-contrib-connect": "^0.9.0",
1717
"grunt-contrib-cssmin": "^0.10.0",

0 commit comments

Comments
 (0)