diff --git a/.gitattributes b/.gitattributes index 49bf673..c647c2b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,6 @@ -src/ linguist-generated=true +/src/** linguist-vendored +/examples/* linguist-vendored + +src/grammar.json -diff +src/node-types.json -diff +src/parser.c -diff diff --git a/.gitignore b/.gitignore index 2e4358c..3862384 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -.direnv -node_modules -build -go.work -Session.vim +Cargo.lock +package-lock.json +/build +/node_modules +/examples/*/ +/target diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..194ff84 --- /dev/null +++ b/.npmignore @@ -0,0 +1,5 @@ +/test +/examples +/build +/script +/target diff --git a/Cargo.toml b/Cargo.toml index da3c39d..ceb29b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "tree-sitter-bass" -description = "Bass grammar for the tree-sitter parsing library" +description = "Bass grammar for tree-sitter" version = "0.0.1" +authors = [ + "Alex Suraci ", + "Amaan Qureshi ", +] +license = "MIT" readme = "bindings/rust/README.md" keywords = ["incremental", "parsing", "bass"] categories = ["parsing", "text-editors"] repository = "https://github.com/vito/tree-sitter-bass" -edition = "2018" -license = "MIT" +edition = "2021" +autoexamples = false build = "bindings/rust/build.rs" -include = [ - "bindings/rust/*", - "grammar.js", - "queries/*", - "src/*", -] +include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] [lib] path = "bindings/rust/lib.rs" [dependencies] -tree-sitter = "~0.20" +tree-sitter = "~0.20.9" [build-dependencies] cc = "1.0" diff --git a/package.json b/package.json index 4e4fc72..7582d08 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,49 @@ { "name": "tree-sitter-bass", - "version": "0.10.0", - "description": "Bass grammar for Tree-sitter.", - "main": "grammar.js", - "repository": "https://github.com/vito/tree-sitter-bass", - "author": "Alex Suraci", + "version": "0.0.1", + "description": "Bass grammar for tree-sitter", + "main": "bindings/node", + "keywords": [ + "parser", + "lexer", + "bass" + ], + "author": "Alex Suraci ", + "contributors": [ + "Amaan Qureshi " + ], "license": "MIT", + "bugs": { + "url": "https://github.com/vito/tree-sitter-bass/issues" + }, + "homepage": "https://github.com/vito/tree-sitter-bass#readme", "dependencies": { "nan": "^2.16.0" }, "devDependencies": { - "typescript": "^4.8.2" "eslint": "^8.35.0", "eslint-config-google": "^0.14.0", + "tree-sitter-cli": "^0.20.7" + }, + "repository": "https://github.com/vito/tree-sitter-bass", + "scripts": { + "build": "tree-sitter generate && node-gyp build", + "lint": "eslint grammar.js", + "parse": "tree-sitter parse", + "test": "tree-sitter test && script/parse-examples", + "test-windows": "tree-sitter test" }, "tree-sitter": [ { "scope": "source.bass", - "file-types": ["bass"], - "first-line-regex": "#!.*\\bbass$" + "injection-regex": "bass", + "first-line-regex": "#!.*\\bbass$", + "file-types": [ + "bass" + ], + "highlights": [ + "queries/highlights.scm" + ] } ] }