コンテンツがほとんどない単純なファイルが少ないですが、コンパイル時間は 10 ~ 27 秒です。理由についてのアイデアはありますか?不足しているのは私のマシンですか、それともうなり声の設定ですか? ある種のキャッシュをクリアする必要がありますか?
Gruntfile.js の内容
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
options: {
paths: ["../css"]
},
files: {
"../css/main.css": "../less/main.less",
}
},
bootstrapBuild : {
options : {
paths: ['../css']
},
files : {
"../css/bootstrap.css": "../less/bootstrap.less",
}
}
},
watch: {
options: {
livereload: true
},
markup: {
files: ['../*.php', '../inc/*.php'],
options: {
livereload: true,
}
},
scripts: {
files: ['../js/*.js'],
tasks: [],
options: {
livereload: true,
spawn: false
},
},
mainCSS: {
options: {
livereload: false,
spawn: false
},
files: ['../less/main.less', '../less/responsive/*.less', "../less/common.less"],
tasks: ['less:development']
},
bootstrapBuild : {
options: {
livereload: false,
spawn: false
},
files: ['../less/*.less', '!../less/main.less', "!../less/common.less"],
tasks: ['less:bootstrapBuild'],
spawn: false
},
css: {
files: ['../css/*.css'],
tasks: []
}
}
});
// Less
grunt.loadNpmTasks('grunt-contrib-less');
// Watch
grunt.loadNpmTasks('grunt-contrib-watch');
};
Package.json の内容
{
"name": "Project-Markup",
"version": "0.1.0",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-nodeunit": "^0.4.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-contrib-less": "^0.11.4"
}
}
メインレスコンテンツ
body{
background: red;
}
/* End of Main */