2012-06-26 08:15:54 +02:00
|
|
|
module.exports = function (grunt) {
|
|
|
|
grunt.initConfig({
|
|
|
|
coffee: {
|
|
|
|
lib: {
|
2012-09-01 12:04:06 +02:00
|
|
|
src: ['build/morris.coffee'],
|
|
|
|
dest: '.',
|
2012-06-26 08:15:54 +02:00
|
|
|
options: { bare: false }
|
|
|
|
},
|
|
|
|
spec: {
|
2012-10-25 08:51:13 +02:00
|
|
|
src: ['build/spec.coffee'],
|
|
|
|
dest: 'build',
|
|
|
|
options: { bare: true }
|
2012-06-26 08:15:54 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
concat: {
|
2012-10-28 19:55:37 +01:00
|
|
|
'build/morris.coffee': [
|
|
|
|
'lib/morris.coffee',
|
|
|
|
'lib/morris.grid.coffee',
|
|
|
|
'lib/morris.line.coffee',
|
|
|
|
'lib/morris.area.coffee',
|
|
|
|
'lib/morris.donut.coffee'
|
|
|
|
],
|
2012-10-25 08:51:13 +02:00
|
|
|
'build/spec.coffee': ['spec/support/**/*.coffee', 'spec/lib/**/*.coffee']
|
2012-06-26 08:15:54 +02:00
|
|
|
},
|
|
|
|
min: {
|
|
|
|
'morris.min.js': 'morris.js'
|
|
|
|
},
|
|
|
|
mocha: {
|
|
|
|
spec: {
|
2012-10-25 08:51:13 +02:00
|
|
|
src: 'spec/specs.html',
|
|
|
|
run: true
|
2012-06-26 08:15:54 +02:00
|
|
|
}
|
2012-10-19 10:07:30 +02:00
|
|
|
},
|
|
|
|
watch: {
|
2012-10-25 08:51:13 +02:00
|
|
|
files: ['lib/**/*.coffee', 'spec/lib/**/*.coffee', 'spec/support/**/*.coffee'],
|
2012-10-19 10:07:30 +02:00
|
|
|
tasks: 'default'
|
2012-06-26 08:15:54 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-coffee');
|
|
|
|
grunt.loadNpmTasks('grunt-mocha');
|
|
|
|
|
2012-09-01 12:04:06 +02:00
|
|
|
grunt.registerTask('default', 'concat coffee min mocha');
|
2012-06-26 08:15:54 +02:00
|
|
|
};
|