2012-11-02 02:12:53 +08:00
|
|
|
|
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
|
|
// Project configuration.
|
|
|
|
grunt.initConfig({
|
|
|
|
jshint: {
|
2014-01-09 03:10:16 +08:00
|
|
|
src: {
|
|
|
|
src: ['src/**/*.js']
|
|
|
|
},
|
|
|
|
test: {
|
|
|
|
src: ['test/**/*.js']
|
|
|
|
},
|
2012-11-02 02:12:53 +08:00
|
|
|
options: {
|
|
|
|
browser: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
simplemocha: {
|
|
|
|
all: {
|
|
|
|
src: 'test/run.js',
|
|
|
|
options: {
|
|
|
|
globals: ['should'],
|
|
|
|
timeout: 3000,
|
|
|
|
ignoreLeaks: false,
|
|
|
|
ui: 'bdd'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-01-09 03:10:16 +08:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
2012-11-02 02:12:53 +08:00
|
|
|
grunt.loadNpmTasks('grunt-simple-mocha');
|
|
|
|
|
2014-01-09 03:10:16 +08:00
|
|
|
grunt.registerTask('test', ['simplemocha', 'jshint']);
|
2012-11-02 02:12:53 +08:00
|
|
|
};
|