shelljs

    1熱度

    1回答

    我一直在使用shelljs 在我的超級快速的系統我執行此過: var shell = require('shelljs') const exec = require('child_process').exec console.time('shell mktemp -d') shell.exec('mktemp -d', {silent: true}) console.timeEnd('s

    0熱度

    1回答

    我目前正在嘗試製作一個簡單的命令行節點程序,它允許我輕鬆地爲我製作的許多React/Redux應用程序創建樣板。我使用ShellJS來執行控制檯命令(我也試過使用Node's child_process)。問題是cli-spinner與執行終端命令一起工作。這是我的代碼: #! /usr/bin/env node var shell = require('shelljs'); var user

    3熱度

    1回答

    在一個的NodeJS腳本我有以下的代碼,這使得呼叫同步,並返回從shell腳本我打電話的標準輸出: var sh = require('shelljs'); ... some code var output = sh.exec('./someshellscript.sh', {silent:true}).stdout; console.log(output); ... some more

    2熱度

    1回答

    我想用shelljs在MATLAB執行COMMANDE並完成後發送響應客戶端: var cmd = 'matlab -nojvm -nosplash -nodesktop -noFigureWindows -minimize -r \" senario(); exit; \"'; shell.exec(cmd, function (code, stdout, stderr) {

    1熱度

    1回答

    當我運行在節點下面的代碼: var shell = require('shelljs'); var files = shell.ls('-R', './**/foobar'); console.log('Files found:\n' + files.join('\n')); 我看到這個輸出: ls: no such file or directory: ./**/foobar 我怎麼

    1熱度

    1回答

    因此,我正在處理Windows上的一個問題,我無法殺死使用shell.exec(...)產生的進程。 我創建這樣的過程: const shell = require('shelljs'); // ... let childProcess = shell.exec('someBinary --whatever', { async: true }); 然後試圖殺死它是這樣的: childP

    0熱度

    1回答

    我正在創建一個基於nodejs的小cli。我需要的是能夠調用一個shell腳本,這是我npm模塊的一部分(即推送到npm註冊表)。 我在看shelljs,我發現它可以從文件系統執行腳本。不過,我正在看像shell.execute(require('./execute.sh'))。 有沒有辦法做到這一點

    3熱度

    1回答

    我想寫一個npm腳本來執行ssh shell命令。目前它正在通過執行osascript命令來打開終端窗口並運行該命令。 我想改變它來執行當前終端的命令。該腳本包括shelljs和executive。當我使用executive時,腳本沒有發生任何事情。隨着shelljs我得到: Pseudo-terminal will not be allocated because stdin is not a