Skip to content
Snippets Groups Projects
Commit 245557b7 authored by okarpenko's avatar okarpenko
Browse files

MAGETWO-33903: Implement JS bundling preprocessing

parent bc7cfcba
Branches
No related merge requests found
This diff is collapsed.
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
'use strict';
module.exports = {
firstLine: 'Copyright © <%= grunt.template.today("yyyy") %> Magento. All rights reserved.',
secondLine: 'See COPYING.txt for license details.',
css: function () {
return '/**\n * ' + this.firstLine + '\n * ' + this.secondLine + '\n */\n';
},
less: function () {
return '// /**\n// * ' + this.firstLine + '\n// * ' + this.secondLine + '\n// */\n';
},
html: function () {
return '<!--\n/**\n * ' + this.firstLine + '\n * ' + this.secondLine + '\n */\n-->\n';
}
};
...@@ -14,10 +14,10 @@ module.exports = { ...@@ -14,10 +14,10 @@ module.exports = {
tmpSource: 'var/view_preprocessed/source/', tmpSource: 'var/view_preprocessed/source/',
tmp: 'var', tmp: 'var',
css: { css: {
setup: 'setup/pub/magento/setup/css' setup: 'setup/pub/styles'
}, },
less: { less: {
setup: 'setup/module/Magento/Setup/styles' setup: 'setup/view/styles'
}, },
uglify: { uglify: {
legacy: 'lib/web/legacy-build.min.js' legacy: 'lib/web/legacy-build.min.js'
......
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
'use strict';
var banner = require('./banner');
module.exports = {
options: {
position: 'top',
linebreak: true
},
setup: {
options: {
banner: banner.css()
},
files: {
src: '<%= path.css.setup %>/*.css'
}
},
documentationCss: {
options: {
banner: banner.css()
},
files: {
src: '<%= path.doc %>/**/*.css'
}
},
documentationLess: {
options: {
banner: banner.less()
},
files: {
src: '<%= path.doc %>/**/*.less'
}
},
documentationHtml: {
options: {
banner: banner.html()
},
files: {
src: '<%= path.doc %>/**/*.html'
}
}
};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment