Comparing version 0.6.1-1 to 0.6.1-2
@@ -5,3 +5,3 @@ { | ||
"main": "acorn.js", | ||
"version": "0.6.1-1", | ||
"version": "0.6.1-2", | ||
"maintainers": [ | ||
@@ -8,0 +8,0 @@ { |
@@ -1,2 +0,2 @@ | ||
# Acorn (JSX edition) | ||
# Acorn-JSX | ||
@@ -7,14 +7,8 @@ [![Build Status](https://travis-ci.org/RReverser/acorn.svg?branch=master)](https://travis-ci.org/RReverser/acorn) | ||
It was forked to create experimental, alternative, faster [React.js JSX][jsx] parser by integrating pieces | ||
It was forked to create experimental alternative, faster [React.js JSX][jsx] parser by integrating pieces | ||
of code from official parser, modified to match Acorn's parsing logic. | ||
According to [benchmarks](http://marijnhaverbeke.nl/acorn/test/bench.html), Acorn is 5x faster than Esprima | ||
when parsing code with location tracking (call it "source maps enabled mode"), and JSX extensions almost don't | ||
affect those numbers. However, [esprima-fb](https://github.com/facebook/esprima) is forked&maintained from | ||
harmony branch of esprima which is being heavily optimized and currently `acorn-jsx` is only 1.5-2x faster than | ||
`esprima-fb`. | ||
According to [benchmarks](test/bench.html), Acorn-JSX is 2x faster than official [Esprima-based parser][esprima-fb] when location tracking is turned on in both (call it "source maps enabled mode"). At the same time, it consumes all the ES6+JSX syntax that can be consumed by Esprima-FB (this is proved by [official tests](test/tests-jsx.js)). | ||
Currently, it consumes all the ES5+JSX syntax that can be consumed by official [Esprima-based parser][esprima-fb]. | ||
However, official parser can consume ES6 syntax as well, and is maintained by authors of React.js itself, so it's | ||
preferred to be used in real projects. | ||
However, Esprima-FB is maintained by authors of React.js itself, so it's recommended to be used in production code. | ||
@@ -222,3 +216,3 @@ [acorn]: http://marijnhaverbeke.nl/acorn/ | ||
- `--ecma3|--ecma5`: Sets the ECMAScript version to parse. Default is | ||
- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is | ||
version 5. | ||
@@ -225,0 +219,0 @@ |
@@ -1,2 +0,2 @@ | ||
// JSX syntax tests. | ||
// React JSX tests | ||
@@ -3,0 +3,0 @@ var fbTestFixture = { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2396811
68675
34
233