Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installing the grammar from `build/grammar.js` works for normal install commands but leaves the user unable to run `tree-sitter` commands from the current directory. That's because specifying a `grammar.js` path causes the CLI to skip writing a `grammar.json` (which is debatably a bug in the CLI). Other scripts currently work around this by running `tree-sitter generate` themselves, relying on a symlink into the build directory. That doesn't work on Windows, though. This changes the install script so that it copies the `grammar.js` into the current directory and then uses the copied one. With this change, we get our `grammar.json` simply by running `npm install`!
- Loading branch information