जब bin/magento static-content:deployयह कहा जाता है कॉलिंग :
\Magento\Deploy\Console\Command\DeployStaticContentCommand::execute()
यह तरीका कहता है
$deployer = $this->objectManager->create(
'Magento\Deploy\Model\Deployer',
['filesUtil' => $filesUtil, 'output' => $output, 'isDryRun' => $options[self::DRY_RUN_OPTION]]
);
$deployer->deploy($this->objectManagerFactory, $languages);
जिसका अनुवाद है \Magento\Deploy\Model\Deployer::deploy। इस विधि के तल पर आप पाएंगे
foreach ($this->filesUtil->getPhtmlFiles(false, false) as $template) {
$this->htmlMinifier->minify($template);
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$this->output->writeln($template . " minified\n");
} else {
$this->output->write('.');
}
$this->count++;
}
यदि आप चाहते हैं कि आप गहराई से खुदाई कर सकें \Magento\Framework\App\Utility::getPhtmlFilesकि कैसे टेम्पलेट पुनर्प्राप्त किए गए हैं।
लघु संस्करण:
यह कॉल करता है accumulateModuleTemplateFilesऔर accumulateThemeTemplateFilesउसी कक्षा से। ये तरीके (अंत में) का उपयोग कर रहे हैं globऔर कुछ नियमित अभिव्यक्तियाँ मॉड्यूल से और विषयों से सभी टेम्पलेट फ़ाइलों को पुनः प्राप्त करने के लिए और कुछ अजीब नियमित अभिव्यक्तियों के आधार पर \Magento\Framework\View\Template\Html\Minifier(उस औजार \Magento\Framework\View\Template\Html\MinifierInterface) द्वारा छोटा किया जाता है । (देखें minifyविधि)।
वह चीज जो मुझे अभी तक पता नहीं है, यह कैसे उपयोग के लिए इन टेम्पलेट्स को लोड किया गया है। सबसे शायद वे टेम्पलेट इंजन द्वारा लोड किए गए हैं। मैं यहाँ वापस पोस्ट करूँगा / अगर मुझे वह मिल जाए।
[संपादित करें]
मैंने पाया कि जब minified टेम्पलेट का उपयोग किया जाता है। आप के लिए मूल्य निर्धारित करते हैं Store->Configuration->Developer->Template Settings->Minify HTMLकरने के लिए Yesऔर जब उत्पादन मोड पर।