Watch scanner changes and only node-gyp build
Previously I was rebuilding the parser.c program for every scanner.cc change. This now makes it possible to only recompile and link scanner.cc without regenerating the parser.
Additionally this also improves the naming convention.
"extensions": "txt",
"quiet": true
},
- "build-test": {
+ "build-grammar": {
+ "patterns": [
+ "./"
+ ],
+ "extensions": "js",
+ "quiet": true
+ },
+ "build-scanner": {
"patterns": [
- "./",
"src"
],
- "extensions": "js,cc",
+ "extensions": "cc",
"quiet": true
}
},
"scripts": {
"build": "tree-sitter generate && node-gyp build",
"test": "tree-sitter test",
- "build-test": "tree-sitter generate && node-gyp build && tree-sitter test",
+ "build-scanner": "node-gyp build",
+ "build-grammar": "tree-sitter generate && node-gyp build && tree-sitter test",
"watch-test": "npm-watch test",
- "watch-grammar": "npm-watch build-test"
+ "watch-grammar": "npm-watch build-grammar",
+ "watch-scanner": "npm-watch build-scanner"
}
}
