Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move blank theme dependencies out of Magento_Theme requirejs-config #8982

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/code/Magento/Theme/view/frontend/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ var config = {
},
deps: [
'jquery/jquery.mobile.custom',
'js/responsive',
'mage/common',
'mage/dataPost',
'js/theme',
'mage/bootstrap'
]
};
11 changes: 11 additions & 0 deletions app/design/frontend/Magento/blank/requirejs-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
Copy link
Contributor

@Igloczek Igloczek Mar 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say that adding requirejs-config.js at theme root should be considered as anti-pattern and Magento core shouldn't promote it, b/c it's against "everything is a module" aproach.

By default this config file is stored in Theme module of Magento vendor, so following files structure, it should be added as app/design/frontend/Magento/blank/Magento_Theme/requirejs-config.js and JS files should be moved from app/design/frontend/Magento/blank/web/js to app/design/frontend/Magento/blank/Magento_Theme/web/js.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point and I agree with you. I've updated the code and tested it.

Thanks :)

* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

var config = {
deps: [
"js/responsive",
"js/theme"
]
};