Skip to content

A template repository for creating tree-sitter grammars

Notifications You must be signed in to change notification settings

SKalt/template-tree-sitter-grammar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickstart

#!/usr/bin/env bash
dest="${dest:-tree-sitter-grammar-GRAMMAR-NAME-HERE}"
npx degit SKalt/template-tree-sitter-grammar "$dest" \
  && cd "$dest" \
  && git init \
  && yarn
# optionally
yarn init
with npm
#!/usr/bin/env bash
dest="${dest:-'tree-sitter-GRAMMAR-NAME-HERE'}"
npx degit SKalt/template-tree-sitter-grammar "$dest" \
  && cd "$dest" \
  && git init \
  && npm install
# optionally
npm init
without degit
#!/usr/bin/env bash
dest="${dest:-tree-sitter-grammar-GRAMMAR-NAME-HERE}"
git clone https://github.com/SKalt/template-tree-sitter-grammar.git "$dest" \
  && cd "$dest" \
  && rm -rf ./.git \
  && git init \
  && yarn install
# optionally
yarn init
source ./scripts/workspace.sh # puts the local tree-sitter cli on your $PATH