tree-sitter-hcl
tree-sitter-hcl copied to clipboard
Publish grammar to npm
Is your feature request related to a problem? Please describe. I would like to use the hcl grammar from a nodejs project. However, it is not published to NPM and I need to set up a full build chain to build the project locally, which I'd like to avoid
Describe the solution you'd like
Have the package available from npmjs as tree-sitter-hcl
Describe alternatives you've considered Building the grammar locally
Notes on how I got this to run:
- Download release 1.1.0 from releases page
- Unpack release to
./vendor/tree-sitter-hcl-1.1.0/in my project - Run
tree-sitter generateinvendor/tree-sitter-hcl-1.1.0/. This updatesbinding.gyp - Update
binding.gypto include"src/scanner.css"in thesources-array - Add
"tree-sitter-hcl": "./vendor/tree-sitter-hcl-1.1.0/"to mydependenciesinpackage.json - Run
npm i
I think despite the name it's somewhat related to https://github.com/tree-sitter-grammars/tree-sitter-hcl/pull/52. We should have some actions to upload to npm and other package repositories. Cc @clason
Yes. Upstream is working on it.
We do have actions to upload to npm other package repositories.
It would be great to publish to pypi as well.
Is there anything we could help to move this forward?
@clason is there an org level token that we can use for non/pypi so we can start uploading with GitHub actions?
Not that I know of (and, sorry to say, I personally don't care about package repositories, so I'm not really able to help here).
We have NPM_TOKEN for the tree-sitter-grammars org but the namespace is required.
It would be great to publish to pypi as well.
Is there anything we could help to move this forward? @alejolagosm
I made a fork for a personal project. It's not on PyPi but it can be directly imported from a pyproject.toml:
dependencies = [
"pandas>=2.2.3",
# [...]
"tree-sitter-hcl @ git+https://github.com/VigorousWhimsicalGoat/tree-sitter-hcl",
]