Grunt watch doesn't watch _theme.less and custom less filehow to compile single LESS file in...
How can I place the product on a social media post better?
Mac Pro install disk keeps ejecting itself
Why do Computer Science majors learn Calculus?
Apply MapThread to all but one variable
Which big number is bigger?
Reducing vertical space in stackrel
How to type a section sign (§) into the Minecraft client
With a Canadian student visa, can I spend a night at Vancouver before continuing to Toronto?
Is there a way to get a compiler for the original B programming language?
how to sum variables from file in bash
If a warlock with the Repelling Blast invocation casts Eldritch Blast and hits, must the targets always be pushed back?
What is the incentive for curl to release the library for free?
Please, smoke with good manners
The Defining Moment
What does the "ep" capability mean?
Examples of subgroups where it's nontrivial to show closure under multiplication?
Do I have to worry about players making “bad” choices on level up?
What route did the Hindenburg take when traveling from Germany to the U.S.?
A Note on N!
Is there any limitation with Arduino Nano serial communication distance?
How can the Zone of Truth spell be defeated without the caster knowing?
Was there a shared-world project before "Thieves World"?
How can I change the color of a part of a line?
What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?
Grunt watch doesn't watch _theme.less and custom less file
how to compile single LESS file in magento2Configure Grunt to watch the overrided vendor module css - Magento2Magento 2 Theme - grunt watch with overridden {module}.scssMagento Grunt Less Compilation behaves weirdCan't modify style in custom theme using Gruntmagento 2 Grunt watch loads old css when changing imported css fileGrunt - is it possible to watch custome module less files?(Magento2) Grunt Less problem with a new themeGrunt, .less, and Live Reload - Can't get them workingImport new custom less files after grunt configuration
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
magento2 error custom less grunt
edited Apr 13 '17 at 4:50
Jenith Samuel
218218
218218
asked Apr 12 '17 at 22:47
Max.AMax.A
286
286
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f169953%2fgrunt-watch-doesnt-watch-theme-less-and-custom-less-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
add a comment |
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
add a comment |
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
answered Apr 13 '17 at 12:15
Max.AMax.A
286
286
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f169953%2fgrunt-watch-doesnt-watch-theme-less-and-custom-less-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown