Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Provide global install info on npm for using command-line tool #245

Open
wants to merge 2 commits into from

2 participants

@kyledrake

When using npm install uglify-js without a -g, the command line tool doesn't appear. I made a quick note of this behavior for people that aren't as familiar with npm/node.

@michaelficarra

No, no, no. -g shouldn't be used on shared machines. Just add ~/node_modules (or wherever npm is configured to put binaries) to your PATH. Installing everything to system directories was not the intended use of npm. If it was, it wouldn't require a special flag.

@kyledrake

Cool, thanks! Could you update the documentation to provide this information? My motivation for this was simply to fix using the command-line tool with npm. The README doesn't document how to do this and it's causing issues for people that aren't super familiar with npm.

@michaelficarra

Sorry, I'm not a collaborator. I believe @mishoo is the only one with push access to this repo. But if you make a nice pull request with the kind of documentation you'd like (that doesn't encourage users to mess with anything outside their home directory), I'm sure he'd pull it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +2 −1  README.html
  2. +2 −1  README.org
View
3  README.html
@@ -331,7 +331,8 @@ <h3 id="sec-1_2"><span class="section-number-3">1.2</span> Install (NPM) </h3>
<p>
UglifyJS is now available through NPM &mdash; <code>npm install uglify-js</code> should do
-the job.
+the job. If you intend to use the command-line tool, install the package globally:
+<code>npm install uglify-js -g</code>
</p>
</div>
View
3  README.org
@@ -142,7 +142,8 @@ following cases UglifyJS *doesn't touch* calls or instantiations of Array:
** Install (NPM)
UglifyJS is now available through NPM --- =npm install uglify-js= should do
-the job.
+the job. If you intend to use the command-line tool, install the package globally:
+=npm install uglify-js -g=
** Install latest code from GitHub
Something went wrong with that request. Please try again.