aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-11-21 13:27:03 +0200
committerMihai Bazon <mihai@bazon.net>2012-11-21 13:27:03 +0200
commit642ba2e92c12bd36810ab42106f922de04bb48f4 (patch)
treef97270ae174ae6c066bbf002a9a9de91b86bab8b
parent089ac908b794bf1bc06d004bcb32d3d65f19ce64 (diff)
downloadtracifyjs-642ba2e92c12bd36810ab42106f922de04bb48f4.tar.gz
tracifyjs-642ba2e92c12bd36810ab42106f922de04bb48f4.zip
rename the npm package to "uglify-js" and cli tool to "uglifyjs"
-rw-r--r--README.md24
-rwxr-xr-xbin/uglifyjs (renamed from bin/uglifyjs2)0
-rw-r--r--package.json6
3 files changed, 15 insertions, 15 deletions
diff --git a/README.md b/README.md
index 4bf29b20..de343c70 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ Install
From NPM:
- npm install uglify-js2
+ npm install uglify-js
From Git:
@@ -25,7 +25,7 @@ From Git:
Usage
-----
- uglifyjs2 [input files] [options]
+ uglifyjs [input files] [options]
UglifyJS2 can take multiple input files. It's recommended that you pass the
input files first, then pass the options. UglifyJS will parse input files
@@ -98,12 +98,12 @@ map.
For example:
- uglifyjs2 /home/doe/work/foo/src/js/file1.js \
- /home/doe/work/foo/src/js/file2.js \
- -o foo.min.js \
- --source-map foo.min.js.map \
- --source-map-root http://foo.com/src \
- -p 5 -c -m
+ uglifyjs /home/doe/work/foo/src/js/file1.js \
+ /home/doe/work/foo/src/js/file2.js \
+ -o foo.min.js \
+ --source-map foo.min.js.map \
+ --source-map-root http://foo.com/src \
+ -p 5 -c -m
The above will compress and mangle `file1.js` and `file2.js`, will drop the
output in `foo.min.js` and the source map in `foo.min.js.map`. The source
@@ -140,7 +140,7 @@ When mangling is enabled but you want to prevent certain names from being
mangled, you can declare those names with `--reserved` (`-r`) — pass a
comma-separated list of names. For example:
- uglifyjs2 ... -m -r '$,require,exports'
+ uglifyjs ... -m -r '$,require,exports'
to prevent the `require`, `exports` and `$` names from being changed.
@@ -206,7 +206,7 @@ separate file and include it into the build. For example you can have a
and build your code like this:
- uglifyjs2 build/defines.js js/foo.js js/bar.js... -c
+ uglifyjs build/defines.js js/foo.js js/bar.js... -c
UglifyJS will notice the constants and, since they cannot be altered, it
will evaluate references to them to the value itself and drop unreachable
@@ -288,7 +288,7 @@ SpiderMonkey AST. It has a small CLI utility that parses one file and dumps
the AST in JSON on the standard output. To use UglifyJS to mangle and
compress that:
- acorn file.js | uglifyjs2 --spidermonkey -m -c
+ acorn file.js | uglifyjs --spidermonkey -m -c
The `--spidermonkey` option tells UglifyJS that all input files are not
JavaScript, but JS code described in SpiderMonkey AST in JSON. Therefore we
@@ -310,7 +310,7 @@ API Reference
Assuming installation via NPM, you can load UglifyJS in your application
like this:
- var UglifyJS = require("uglify-js2");
+ var UglifyJS = require("uglify-js");
It exports a lot of names, but I'll discuss here the basics that are needed
for parsing, mangling and compressing a piece of code. The sequence is (1)
diff --git a/bin/uglifyjs2 b/bin/uglifyjs
index 1706629c..1706629c 100755
--- a/bin/uglifyjs2
+++ b/bin/uglifyjs
diff --git a/package.json b/package.json
index cc0f318d..f55b2eac 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
{
- "name": "uglify-js2",
+ "name": "uglify-js",
"description": "JavaScript parser, mangler/compressor and beautifier toolkit",
"homepage": "http://lisperator.net/uglifyjs",
"main": "tools/node.js",
- "version": "2.1.11",
+ "version": "2.2.0",
"engines": { "node" : ">=0.4.0" },
"maintainers": [{
"name": "Mihai Bazon",
@@ -19,7 +19,7 @@
"optimist" : "~0.3.5"
},
"bin": {
- "uglifyjs2" : "bin/uglifyjs2"
+ "uglifyjs" : "bin/uglifyjs"
},
"scripts": {"test": "node test/run-tests.js"}
}