我使用 grunt 和Gruntfile.js
监视文件和启动测试,像这样
// Gruntfile.js
module.exports = function(grunt){
grunt.initConfig({
watch: {
grunt: {
files: ['Gruntfile.js']
},
python: {
files : ['./tests/*.py','./libs/*/*.py'],
tasks: ['pythontest'],
},
}
});
grunt.registerTask('pythontest', function(){
grunt.util.spawn({
cmd: 'python',
args: ['setup.py','test'],
opts: {stdio: 'inherit'},
});
});
grunt.registerTask('default', ['watch']);
};
我正在搜索 python 解决方案,例如watchdog。
对于任务和命令的定义,看门狗有一些类似的文件Gruntfile.js
?