Skip to content

Commit

Permalink
export TreeTransformer (#1950)
Browse files Browse the repository at this point in the history
- link to existing documentation on `TreeWalker` & `TreeTransformer`
- fix Travis build failures

fixes #1949
  • Loading branch information
alexlamsl committed May 16, 2017
1 parent 050474a commit cb45886
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: node_js
before_install: "npm install -g npm"
node_js:
- "0.10"
- "0.12"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,12 @@ var result = UglifyJS.minify(ast, {
// result.code contains the minified code in string form.
```

### Working with Uglify AST

Transversal and transformation of the native AST can be performed through
[`TreeWalker`](http://lisperator.net/uglifyjs/walk) and
[`TreeTransformer`](http://lisperator.net/uglifyjs/transform) respectively.

### ESTree / SpiderMonkey AST

UglifyJS has its own abstract syntax tree format; for
Expand Down
1 change: 1 addition & 0 deletions tools/exports.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
exports["Dictionary"] = Dictionary;
exports["TreeWalker"] = TreeWalker;
exports["TreeTransformer"] = TreeTransformer;
exports["minify"] = minify;
exports["_push_uniq"] = push_uniq;

0 comments on commit cb45886

Please sign in to comment.