Development experience (#25)

* Rename prebuild target clashing with build target

* Add test:watch target and documentation
This commit is contained in:
Kenneth Skovhus 2018-08-06 19:03:34 +02:00 committed by Max Brunsfeld
parent 9bbd80dee1
commit 70d94eb826
4 changed files with 27 additions and 4 deletions

View File

@ -33,7 +33,7 @@ branches:
deploy: deploy:
provider: script provider: script
script: npm run prebuild && npm run prebuild:upload -u ${PREBUILD_UPLOAD} script: npm run pre-build && npm run pre-build:upload -u ${PREBUILD_UPLOAD}
skip_cleanup: true skip_cleanup: true
on: on:
all_branches: true all_branches: true

View File

@ -6,6 +6,21 @@ tree-sitter-bash
Bash grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter). Bash grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).
### Development
Install the dependencies:
npm install
Build and run the tests:
npm run build
npm run test
Run the build and tests in watch mode:
npm run test:watch
#### References #### References
* [Bash man page](http://man7.org/linux/man-pages/man1/bash.1.html#SHELL_GRAMMAR) * [Bash man page](http://man7.org/linux/man-pages/man1/bash.1.html#SHELL_GRAMMAR)

View File

@ -25,4 +25,4 @@ branches:
- master - master
- /^v.*$/ - /^v.*$/
deploy_script: IF "%APPVEYOR_REPO_TAG%" == "true" (npm run prebuild && npm run prebuild:upload -u %PREBUILD_UPLOAD%) deploy_script: IF "%APPVEYOR_REPO_TAG%" == "true" (npm run pre-build && npm run pre-build:upload -u %PREBUILD_UPLOAD%)

View File

@ -14,16 +14,24 @@
"prebuild-install": "^5.0.0" "prebuild-install": "^5.0.0"
}, },
"devDependencies": { "devDependencies": {
"nodemon": "^1.18.3",
"prebuild": "^7.6.1", "prebuild": "^7.6.1",
"tree-sitter-cli": "^0.13.1" "tree-sitter-cli": "^0.13.1"
}, },
"scripts": { "scripts": {
"build": "tree-sitter generate && node-gyp build", "build": "tree-sitter generate && node-gyp build",
"install": "prebuild-install || node-gyp rebuild", "install": "prebuild-install || node-gyp rebuild",
"prebuild": "prebuild --all --strip --verbose", "pre-build": "prebuild --all --strip --verbose",
"prebuild:upload": "prebuild --upload-all", "pre-build:upload": "prebuild --upload-all",
"test": "tree-sitter test && script/parse-examples.sh", "test": "tree-sitter test && script/parse-examples.sh",
"test:watch": "nodemon --exec 'npm run build && npm run test' --ext js,txt,sh",
"test-windows": "tree-sitter test" "test-windows": "tree-sitter test"
}, },
"nodemonConfig": {
"ignore": [
"build/",
"src/"
]
},
"repository": "https://github.com/tree-sitter/tree-sitter-bash" "repository": "https://github.com/tree-sitter/tree-sitter-bash"
} }