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

grunt exec:<theme> #6943

Closed
slackerzz opened this issue Oct 10, 2016 · 8 comments
Closed

grunt exec:<theme> #6943

slackerzz opened this issue Oct 10, 2016 · 8 comments
Labels
Area: Frontend bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@slackerzz
Copy link
Member

according to Compile LESS with Grunt docs

grunt exec:<theme>

Republishes symlinks to the source files to the pub/static/frontend/<Vendor>/<theme>/<locale> directory.

If your less file contains an @import statement it will copied to pub/static/frontend/<Vendor>/<theme>/<locale> instead of being symlinked

@slackerzz slackerzz changed the title grunt exec:themename grunt exec:<theme> Oct 10, 2016
@tkacheva
Copy link

@slackerzz thanks for reporting. What is your Magento version?

@tkacheva
Copy link

Internal issue MAGETWO-59579

@tkacheva tkacheva added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Oct 11, 2016
@slackerzz
Copy link
Member Author

I'm running 2.1.1

@tkacheva tkacheva added the 2.1.x label Oct 12, 2016
@eug123
Copy link
Contributor

eug123 commented Oct 24, 2016

Hi @slackerzz,
Files are published as copies in case they were preprocessed somehow, please compare your original less source and its' published copy.

@slackerzz
Copy link
Member Author

I've compared the two files and they are different, under app/code/design/frontend/<Vendor>/<theme>/css/source my less files contains some:

@import "dir/_mypartial"

while in pub/static/frontend/<Vendor>/<theme>/<locale> these imports became:

@import "dir/_mypartial.less"

but why? It doesn't make sense http://lesscss.org/features/#import-directives-feature

@eug123
Copy link
Contributor

eug123 commented Oct 25, 2016

@slackerzz yes you are right, you can import files without extension.
But currently magento processes @import directives so to find respective file and rebuilds @import using actually found file path with extension.
So to have symlinks you need to include .less extension to the path and use single quotes
(i.e. @import 'dir/_mypartial.less';).
Thanks

@slackerzz
Copy link
Member Author

Maybe It would be nice to include such information in the docs. I thought I was using standard LESS, instead we have a customized version. Each day I discover a different behavior from the standard LESS language, like #4218 or #2264

mmansoor-magento pushed a commit that referenced this issue Nov 10, 2016
Fixed issues:
- MAGETWO-59579: [Github #6943] grunt exec:<theme> doesn't work with @import</theme>
- MAGETWO-57210: [github #6195, #4101] Gallery doesn't show all images added to configurable options
- MAGETWO-59003: Js file version regenerated in browser on every page reload in develop mode
@veloraven
Copy link
Contributor

I'm closing this issue as it was fixed in develop branch.

magento-cicd2 pushed a commit that referenced this issue Jun 29, 2021
L3 Bugfix delivery. 2.4-develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

4 participants