Skip to content

Latest commit

 

History

History
155 lines (135 loc) · 6.06 KB

README.md

File metadata and controls

155 lines (135 loc) · 6.06 KB

nodejsscriptDocs


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.

Index

Namespaces

Classes

Interfaces

Type Aliases

Variables

Functions