2013-05-26 22:02:48 +00:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.initConfig({
|
|
|
|
jshint: {
|
|
|
|
/*options: {
|
|
|
|
jshintrc: '.jshintrc'
|
|
|
|
},*/
|
|
|
|
files: [
|
|
|
|
'Gruntfile.js',
|
2013-05-26 22:38:54 +00:00
|
|
|
'package.json'
|
|
|
|
//,'js/**/*.js',
|
|
|
|
//'<%= nodeunit.tests %>'
|
2013-05-26 22:02:48 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
/*
|
|
|
|
nodeunit: {
|
|
|
|
tests: ['tests/nodeunit/*_test.js']
|
|
|
|
},
|
|
|
|
*/
|
|
|
|
connect: {
|
|
|
|
www: {
|
|
|
|
options: {
|
2013-05-26 22:29:40 +00:00
|
|
|
base: '.',
|
2013-05-26 22:02:48 +00:00
|
|
|
port: 4545
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
ghost: {
|
|
|
|
test: {
|
|
|
|
files: [{
|
|
|
|
src: ['tests/integration/casperjs/*_test.js']
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
args: {
|
|
|
|
baseUrl: 'http://localhost:' +
|
2013-05-26 22:35:12 +00:00
|
|
|
'<%= connect.www.options.port %>/'
|
2013-05-26 22:02:48 +00:00
|
|
|
},
|
|
|
|
direct: false,
|
|
|
|
logLevel: 'error',
|
|
|
|
printCommand: false,
|
|
|
|
printFilePaths: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2013-05-26 21:58:59 +00:00
|
|
|
|
2013-05-26 22:02:48 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-connect');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
|
|
//grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
|
|
|
grunt.loadNpmTasks('grunt-ghost');
|
2013-05-26 21:58:59 +00:00
|
|
|
|
2013-05-26 22:02:48 +00:00
|
|
|
grunt.registerTask('test', ['jshint', /*'nodeunit',*/ 'connect', 'ghost']);
|
|
|
|
|
|
|
|
};
|