Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs suggest installing globally and shouldn't #609

Open
msimerson opened this issue Mar 24, 2022 · 1 comment
Open

docs suggest installing globally and shouldn't #609

msimerson opened this issue Mar 24, 2022 · 1 comment

Comments

@msimerson
Copy link

On the Getting started page, it says:

To use the nearley compiler, you need to additionally install nearley globally.

and shows: npm install -g nearley.

Since a few years back when npx shipped, there's a much better way to run the nearly scripts: npx nearley-{test|unparse|railroad}. The docs should be updated to suggest that instead.

@msfeldstein
Copy link

Is there a way to install it locally and have an npm script be able to run nearleyc? I installed via npm install --save-dev nearley and then have a script "compile-expression-grammar": "nearleyc path/to/grammar.ne -o path/to/grammar.js" but running npm run compile-expression-grammar fails with /var/folders/2p/3f9_b05n3hvc2yxnzqwwswmm0000gp/T/compile-expression-grammar-9adeceb5.sh: line 1: nearleyc: command not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants