vue - check-versions.js for shell

shelljs:https://www.npmjs.com/package/shelljs , 类似linux、unix、powser shell里面的命令.

 

ShellJS是Node.js API之上的Unix shell命令的可移植(Windows / Linux / OS X)实现.

复制代码
 1 var shell = require('shelljs');
 2  
 3 if (!shell.which('git')) {
 4   shell.echo('Sorry, this script requires git');
 5   shell.exit(1);
 6 }
 7 
 8 
 9 
10 var shell = require('shelljs');
11  
12 if (!shell.which('git')) {
13   shell.echo('对不起,这个脚本需要git');
14   shell.exit(1);
15 }
复制代码

 

posted @   Sunsin  阅读(434)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示