Questions tagged [shelljs]

For questions related to portable implementation of Unix shell commands for Node.js.

ShellJS is a portable (Windows/Linux/OS X) implementation of Unix on top of the

Usage

Install it using

$ npm install -g shelljs

And run scripts

$ shjs your_script_file

See also

82 questions
0
votes
1 answer

shelljs to execute a shell script part of npm module

I am creating a a little nodejs based cli. What I require is ability to call a shell script thats part of my npm module (thats pushed to a npm registry). I was looking at shelljs and I found it could execute scripts from the file system. However I…
Sathyakumar Seshachalam
  • 2,013
  • 3
  • 20
  • 32
0
votes
1 answer

Sending response after file changes

I want to execute a commande in matlab using shelljs and after it finish send response to client : var cmd = 'matlab -nojvm -nosplash -nodesktop -noFigureWindows -minimize -r \" senario(); exit; \"'; shell.exec(cmd, function (code, stdout,…
ketimaBU
  • 901
  • 4
  • 15
  • 35
0
votes
0 answers

Can i open a new shell window or tab with node.js

When i use shelljs, How can i execute script by opening another shell window or tab ? I need to start api server and build app both. like var shell = require('shelljs'); ... shell.exec('node server.js'); shell.exec('npm run build')
Albin Liao
  • 35
  • 1
  • 1
  • 4
0
votes
1 answer

ShelllJS exec returning null for every command -- Atom Package Development

I am creating an Atom package and trying to incorporate a ShellJS command. I want to use the exec() commmand, and it's returning null everytime, for every command. shelljs = require 'shelljs/global' console.log exec('which git').code // returns…
Aymon Fournier
  • 4,323
  • 12
  • 42
  • 59
0
votes
2 answers

Script to refactor assignment a.x=3 to setter method a->setX(3)

I'm converting part of my code from JS to C++ thus I need to refactor direct instance variables assignment into setter methods: a.xx=3; to a->setXx(3); and also getter methods: ...a.xx... to ...a->getXx()... Currently I use shelljs (node.js) for the…
PerfectGamesOnline.com
  • 1,774
  • 1
  • 18
  • 31
-1
votes
1 answer

express api for test with jest

How to write rest api with express for checking js code with jest? import shell from 'shelljs' import path from 'path' export const checkTask = (req, res) => { shell.touch('./task.test.js') shell.ShellString(`const getSum = (a, b) => a +…
-1
votes
1 answer

Stop program with ShellJs command

I'm using codeceptjs with shelljs. In one of tests I'm invoking a Go application like this: const shell = require('shelljs') let execution = shell.exec('./myGoApplication') execution.kill(); I tried to stop it with kill with different params but…
Kyryl Zotov
  • 1,788
  • 5
  • 24
  • 44
1 2 3 4 5
6