Last active
September 6, 2023 08:12
-
-
Save peterjaap/b1b1fa6188ea1e0c8dfa5b336f2fb89b to your computer and use it in GitHub Desktop.
Identify used Magento 2 frontend extensions in a Luma install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Run with the URL pointing to a require-config.js as the first argument; | |
// php identify.php http://magento2demo.firebearstudio.com/pub/static/frontend/Magento/luma/en_US/requirejs-config.js | |
$content = file_get_contents($argv[1]); | |
preg_match_all( | |
'/(?P<quote>\'|")(?P<extension>[[:alnum:]]+_[[:alnum:]]+)\/js\/.+?(?P=quote)/m', | |
$content, | |
$matches | |
); | |
sort($matches['extension']); | |
print_r(array_unique($matches['extension'])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
amazing!