Last active
August 29, 2015 14:03
-
-
Save juanpabloaj/4dbb58be44ac18b681b1 to your computer and use it in GitHub Desktop.
python test and git with grunt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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