Answer the question
In order to leave comments, you need to log in
How to install less?
Good afternoon, for the first time I put less, I can’t configure it)
What I did:
1) Downloaded Node.js
2) Also downloaded https://github.com/gruntjs/grunt-contrib-watch took only package.json files from here and Gruntfile.js
3) I put it in the tasks/less.min.js folder
4) I added it to the grant file
module.exports = function(grunt) {
grunt.initConfig({
less: {
options: {
paths: ['less']
},
files: {
"css/main.css": "less/style.less"
}
},
watch: {
less: {
files: [
"less/**"
],
tasks: "less:main"
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['less', 'watch']);
};
{
"name": "grunt-cli",
"description": "The grunt command line interface",
"version": "1.2.0",
"author": "Grunt Development Team (http://gruntjs.com/development-team)",
"repository": "gruntjs/grunt-cli",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
},
"main": "tasks/less.min.js",
"scripts": {
"test": "node bin/grunt test"
},
"bin": {
"grunt": "bin/grunt"
},
"dependencies": {
"findup-sync": "~0.3.0",
"grunt-known-options": "~1.1.0",
"nopt": "~3.0.6",
"resolve": "~1.1.0"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-concat": "^1.0.0",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-uglify": "^1.0.1",
"grunt-contrib-watch": "^1.0.0"
},
"files": [
"js"
],
"appveyor_id": "prp6g944b05jsq6d"
}
Answer the question
In order to leave comments, you need to log in
remove less.min.js from the root and forget it.
Do like here: https://github.com/gruntjs/grunt-contrib-less
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question