From 5e1f60dbae90ce1608720c49ae21aceb81883864 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Thu, 22 Jan 2015 17:25:50 +0200 Subject: [PATCH] Update repository metadata and readme. --- README.md | 10 +++++++++- package.json | 18 +++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7714e873a7..bee4df9250 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,15 @@ [![Build Status](https://travis-ci.org/marijnh/acorn.svg?branch=master)](https://travis-ci.org/marijnh/acorn) -A tiny, fast JavaScript parser, written completely in JavaScript. +This is modification of [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. + +It was forked to create experimental alternative, faster [React.js JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) parser by integrating pieces of code from official parser, modified to match Acorn's parsing logic. + +According to [benchmarks](https://github.com/RReverser/acorn-jsx/blob/master/test/bench.html), Acorn-JSX is 2x faster than official [Esprima-based parser](https://github.com/facebook/esprima) 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](https://github.com/RReverser/acorn-jsx/blob/master/test/tests-jsx.js)). + +## Transpiler + +Please note that this tool only parses source code to JSX AST, which is useful for various language tools and services. If you want to transpile your code to regular ES5-compliant JavaScript with source map, check out [6to5 transpiler](http://6to5.org/) which used `acorn-jsx` under the hood. ## Installation diff --git a/package.json b/package.json index 2a58547de6..8ffbbede7d 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,20 @@ { - "name": "acorn", - "description": "ECMAScript parser", - "homepage": "http://marijnhaverbeke.nl/acorn/", + "name": "acorn-jsx", + "description": "Alternative, faster React.js JSX parser", + "homepage": "https://github.com/RReverser/acorn-jsx", "main": "acorn.js", "version": "0.11.1-1", "engines": {"node": ">=0.4.0"}, - "maintainers": [{"name": "Marijn Haverbeke", - "email": "marijnh@gmail.com", - "web": "http://marijnhaverbeke.nl"}], + "maintainers": [{"name": "Ingvar Stepanyan", + "email": "me@rreverser.com", + "web": "http://rreverser.com/"}], "repository": {"type": "git", - "url": "http://marijnhaverbeke.nl/git/acorn"}, + "url": "https://github.com/RReverser/acorn-jsx"}, "licenses": [{"type": "MIT", - "url": "http://marijnhaverbeke.nl/acorn/LICENSE"}], + "url": "https://raw.githubusercontent.com/RReverser/acorn-jsx/master/LICENSE"}], "scripts": { "test": "node test/run.js", - "prepublish": "bin/without_eval > acorn_csp.js" + "prepublish": "node bin/without_eval > acorn_csp.js" }, "bin": {"acorn": "./bin/acorn"}, "devDependencies": {"regenerate": "~0.6.2",