/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tools/grunt/configs/combo.js
60 строк
2 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 10:44
22 окт 2025, 10:44
264bea2
Код
Авторство
О чём код?
/** * Copyright 2015 Adobe * All Rights Reserved. */ 'use strict'; var theme = require('../tools/files-router').get('themes'), path = require('./path'); /** * Define Combos for repetitive code. */ module.exports = { collector: function (themeName) { var cmdPlus = /^win/.test(process.platform) ? ' & ' : ' && ', command = 'grunt --force clean:' + themeName + cmdPlus; command = command + 'php bin/magento dev:source-theme:deploy ' + theme[themeName].files.join(' ') + ' --type=less' + ' --locale=' + theme[themeName].locale + ' --area=' + theme[themeName].area + ' --theme=' + theme[themeName].name; return command; }, autopath: function (themeName, folder) { return folder + theme[themeName].area + '/' + theme[themeName].name + '/' + theme[themeName].locale + '/'; }, lessFiles: function (themeName) { var lessStringArray = [], cssStringArray = [], lessFiles = {}, i = 0; for (i; i < theme[themeName].files.length; i++) { cssStringArray[i] = path.pub + theme[themeName].area + '/' + theme[themeName].name + '/' + theme[themeName].locale + '/' + theme[themeName].files[i] + '.css'; lessStringArray[i] = path.pub + theme[themeName].area + '/' + theme[themeName].name + '/' + theme[themeName].locale + '/' + theme[themeName].files[i] + '.less'; lessFiles[cssStringArray[i]] = lessStringArray[i]; } return lessFiles; } };