From a1f8d18e60d96f06817b10ceca706d4f0d1cd7dc Mon Sep 17 00:00:00 2001 From: Jakub Gieryluk Date: Fri, 3 May 2019 17:21:51 +0200 Subject: [PATCH] WIP --- .gitignore | 1 + README.md | 6 +++++- acorn-loose/node_modules/.bin/acorn | 15 +++++++++++++++ acorn-loose/node_modules/.bin/acorn.cmd | 7 +++++++ acorn-loose/package.json | 6 ++++-- acorn-walk/package.json | 6 ++++-- 6 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 acorn-loose/node_modules/.bin/acorn create mode 100644 acorn-loose/node_modules/.bin/acorn.cmd diff --git a/.gitignore b/.gitignore index 1052d7d8a..cee105dbe 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /acorn-loose/dist /acorn-walk/dist /yarn.lock +package-lock.json diff --git a/README.md b/README.md index ef86c3333..8233de711 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/acornjs/acorn.svg?branch=master)](https://travis-ci.org/acornjs/acorn) [![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) -[![CDNJS](https://img.shields.io/cdnjs/v/acorn.svg)](https://cdnjs.com/libraries/acorn) +[![CDNJS](https://img.shields.io/cdnjs/v/acorn.svg)](https://cdnjs.com/libraries/acorn) A tiny, fast JavaScript parser, written completely in JavaScript. @@ -36,6 +36,10 @@ cd acorn npm install ``` +Note that `npm install` might take many minutes to finish. +In particular, `test262` git dependency is huge and can take +a long time to fetch. + ## Plugin developments Acorn is designed to support plugins which can, within reasonable diff --git a/acorn-loose/node_modules/.bin/acorn b/acorn-loose/node_modules/.bin/acorn new file mode 100644 index 000000000..558ebb98b --- /dev/null +++ b/acorn-loose/node_modules/.bin/acorn @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" + ret=$? +else + node "$basedir/../acorn/bin/acorn" "$@" + ret=$? +fi +exit $ret diff --git a/acorn-loose/node_modules/.bin/acorn.cmd b/acorn-loose/node_modules/.bin/acorn.cmd new file mode 100644 index 000000000..45c0c3d03 --- /dev/null +++ b/acorn-loose/node_modules/.bin/acorn.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\acorn\bin\acorn" %* +) \ No newline at end of file diff --git a/acorn-loose/package.json b/acorn-loose/package.json index 08f564edf..cce316ee0 100644 --- a/acorn-loose/package.json +++ b/acorn-loose/package.json @@ -5,7 +5,9 @@ "main": "dist/acorn-loose.js", "module": "dist/acorn-loose.mjs", "version": "6.0.0", - "engines": {"node": ">=0.4.0"}, + "engines": { + "node": ">=0.4.0" + }, "dependencies": { "acorn": "^6.0.0" }, @@ -30,7 +32,7 @@ "url": "https://github.com/acornjs/acorn.git" }, "scripts": { - "prepare": "cd ..; npm run build:loose" + "prepare": "cd .. && npm run build:loose" }, "license": "MIT" } diff --git a/acorn-walk/package.json b/acorn-walk/package.json index aee3f2584..a6ae41191 100644 --- a/acorn-walk/package.json +++ b/acorn-walk/package.json @@ -5,7 +5,9 @@ "main": "dist/walk.js", "module": "dist/walk.mjs", "version": "6.1.1", - "engines": {"node": ">=0.4.0"}, + "engines": { + "node": ">=0.4.0" + }, "maintainers": [ { "name": "Marijn Haverbeke", @@ -27,7 +29,7 @@ "url": "https://github.com/acornjs/acorn.git" }, "scripts": { - "prepare": "cd ..; npm run build:walk" + "prepare": "cd .. && npm run build:walk" }, "license": "MIT" }