2013-08-22 06:35:47 +00:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-less");
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
2013-09-06 16:28:41 +00:00
|
|
|
grunt.loadNpmTasks("grunt-contrib-compress");
|
2013-08-22 06:35:47 +00:00
|
|
|
|
|
|
|
grunt.initConfig({
|
|
|
|
less: {
|
|
|
|
all: {
|
|
|
|
files: {
|
2013-09-06 07:04:20 +00:00
|
|
|
"css/editor.css": "css/seed.less"
|
2013-08-22 06:35:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
css: {
|
|
|
|
files: ["css/*.less"],
|
|
|
|
tasks: ["less"]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
spawn: false
|
|
|
|
}
|
2013-09-06 16:28:41 +00:00
|
|
|
},
|
|
|
|
compress: {
|
2013-09-10 16:19:14 +00:00
|
|
|
pack: {
|
2013-09-06 16:28:41 +00:00
|
|
|
options: {
|
|
|
|
archive: "build/caret.zip",
|
|
|
|
pretty: true
|
|
|
|
},
|
|
|
|
files: {
|
|
|
|
"/": ["config/**", "js/**", "css/*.css", "*.html", "manifest.json", "require.js", "background.js", "*.png"]
|
|
|
|
}
|
|
|
|
}
|
2013-08-22 06:35:47 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
grunt.registerTask("default", ["less", "watch"]);
|
2013-09-06 16:28:41 +00:00
|
|
|
grunt.registerTask("package", ["less:all", "compress:package"]);
|
2013-08-22 06:35:47 +00:00
|
|
|
|
|
|
|
};
|