1

My specific situation:

I'm writing a shell script in which I need to minify a CSS file. I look up CSS minifiers and find packagename. Great! Just what I need.

The npmjs page for packagename tells me to install with npm install packagename. But I don't want Node or anything like that, I just want to use this tool in a shell script.

What can I do here?

1
  • 1
    If you don't want a JavaScript VM and framework, find a tool that is not written in JavaScript. Commented Feb 14, 2019 at 18:08

2 Answers 2

1

NPM packages are simply JavaScript code. Any JavaScript code needs a runtime - whether it's node or your browser. So even if you installed the package, you won't be able to run it without node.
You can however simply download the code of the package from GitHub, but you'll still need a runtime.

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

1 Comment

What about if we make a pkg.
0

Have a look at browserify may be it solves your problem.

In a nutshell it allows you to use node modules without node.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.