4

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

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.