Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/408.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何将npm测试脚本转换为grunt任务?_Javascript_Node.js_Gruntjs - Fatal编程技术网

Javascript 如何将npm测试脚本转换为grunt任务?

Javascript 如何将npm测试脚本转换为grunt任务?,javascript,node.js,gruntjs,Javascript,Node.js,Gruntjs,我的nodeJS有以下脚本 "scripts": { "test": "babel-tape-runner 'test/**/*.js' | tap-notify | tap-diff " } 如果我用npm测试运行我的测试,所有的东西都能正常运行,但我更喜欢把它们都放在一个gruntfile中。有没有办法配置grunt来运行测试?可能的重复我可能会使用grunt exec插件来完成这个需求:谢谢@theaccordance!我可能会使用grunt exec插件来满足这个需求:谢谢@t

我的nodeJS有以下脚本

"scripts": {
    "test": "babel-tape-runner 'test/**/*.js' | tap-notify | tap-diff "
}

如果我用npm测试运行我的测试,所有的东西都能正常运行,但我更喜欢把它们都放在一个gruntfile中。有没有办法配置grunt来运行测试?

可能的重复我可能会使用
grunt exec
插件来完成这个需求:谢谢@theaccordance!我可能会使用
grunt exec
插件来满足这个需求:谢谢@theaccordance!