3

Is there a way to execute commands in Typescript, just like we do in Javascript with Shelljs Library?

Jeffrey Roosendaal
  • 6,872
  • 8
  • 37
  • 55
Celine119
  • 45
  • 1
  • 3

1 Answers1

3

You can use any javascript library in typescript, so shelljs should work too.

Typescript is a so called superset of javascript, which means it adds functionality to the javascript language. Therefore: all valid javascript is valid typescript (but not the other way around).


Install shelljs:

npm install --save shelljs

For extra convenience, you can add the @types for shelljs:

npm install --save @types/shelljs

Maybe you should take a look at Angular Universal, which runs server-side.

Jeffrey Roosendaal
  • 6,872
  • 8
  • 37
  • 55