gruntjs / gruntjs/grunt

grunt does not compile all files

Open
#1,642 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I work with Bootstrap and I have this problem. I have installed Grunt and compile only style.less but not the other files. When I change something in file which is import to style.less it works only when I reeboot Grunt. What could be wrong?
This is my gruntfile.js:

module.exports = function(grunt) {
require('jit-grunt')(grunt);

grunt.initConfig({
less: {
development: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
"css/style.css": "less/style.less"
}
}
},
watch: {
styles: {
files: ['less/**/*.less'],
tasks: ['less'],
options: {
nospawn: true
}
}
}
});

grunt.registerTask('default', ['less', 'watch']);
};

Contributor guide

Open the contributing guide

Research direction

Start with gruntfile.js, especially the less and watch configurations, and reproduce the behavior with a changed file under less/**/*.less. Check whether the watch task invokes the less task for imported files without restarting Grunt. Done means edits to imported LESS files trigger compilation and update css/style.css.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.