package.json
-----------------
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-watch": "^0.6.1",
"less": "^2.5.1"
}
}
---------------
Gruntfile.js
---------------
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.initConfig({
less: {
options: {
ieCompat: true,
},
src: {
expand: true,
cwd: 'less/',
src: [
'*.less'
],
ext: '.css',
dest: 'css'
}
},
watch: {
less: {
files: ["less/*.less"],
tasks: ["less"]
}
}
});
grunt.registerTask('default', ["less", "watch"]);
};
---------------
▽1
●
a-kuma3 ●100ポイント ベストアンサー |
EISDIR は、ディレクトリに関するエラーですけれど、書き込み先に関する問題だと Warning ではなく、Error になると思うので、監視対象の方のディレクトリに問題があるんだと思います。
watch の files で指定している監視対象が、以下のような状況になっているとか。