Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

nodejsscript


nodejsscript / s

s

This namespace refers to shelljs, for docs visits shelljs/shelljs. You can pipe commands when make sense by chaining, see Pipes.

Available commands: cat · cd · chmod · cp · pushd · popd · dirs · find · grep · head · ln · ls · mkdir · mv · pwd · rm · sed · sort · tail · test · touch · uniq · which · error · errorCode

s.cat("./package.json").grep("version");

… this library adds:

Changes/recommenctions:

  • use echo instead of s.echo, this was changed to s.ShellString for easy file writing without logging to console s.echo("Data").to("file.txt").
  • use 'run()'/'runA()' instead of s.exec, because of options for passing arguments in secure way.
  • use '$()' instead of s.set(), because $() allows chaining (you can also access config with $s .is_* keys).
  • use $.xdg.temp instead of s.tempdir() – the $.xdg.* provides more paths than just temp directory.

Modules

Classes

Interfaces

Type Aliases

Variables

Functions