Skip to content

Instantly share code, notes, and snippets.

@juanpabloaj juanpabloaj/Gruntfile.js
Last active Aug 29, 2015

Embed
What would you like to do?
python test and git with grunt
module.exports = function(grunt){
grunt.initConfig({
watch: {
grunt: {
files: ['Gruntfile.js']
},
python: {
files : ['./tests/*.py','./*/*.py'],
tasks: ['pythontest','gitst'],
},
gitindex: {
files : ['.git/index'],
tasks: ['gitst'],
},
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('pythontest', function(){
grunt.util.spawn({
cmd: 'python',
args: ['setup.py','test'],
opts: {stdio: 'inherit'},
});
});
grunt.registerTask('gitst', function(){
grunt.util.spawn({
cmd: 'git',
args: ['status'],
opts: {stdio: 'inherit'},
});
});
grunt.registerTask('default', ['watch']);
};
{
"name": "pythontest",
"version": "0.0.1",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-watch": "^0.6.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.