File tree Expand file tree Collapse file tree 6 files changed +344
-34
lines changed Expand file tree Collapse file tree 6 files changed +344
-34
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ for Visual Studio Code.
99Make sure you have the following binaries installed:
1010
1111- [ ` yarn ` ] ( https://yarnpkg.com/en/ ) : to build the project
12- - [ ` vsce ` ] ( https://code.visualstudio.com/api/working-with-extensions/publishing-extension ) :
13- to package the extension for VS Code.
1412- [ ` code ` ] ( https://code.visualstudio.com/docs/setup/mac ) : to launch VS Code from
1513 the terminal.
1614
@@ -32,9 +30,15 @@ command:
3230yarn build
3331```
3432
35- The output tmLanguage file ` syntaxes/Scala.tmLanguage.json ` is marked as ignored
36- in git and shouldn't be commited into the repository. The output file is
37- validated against the json schema before being written.
33+ The output tmLanguage file ` syntaxes/Scala.tmLanguage.json ` is tracked by git,
34+ and is committed on every release (see [ #23 ] ( https://github.com/scala/vscode-scala-syntax/pull/23 ) ).
35+ The output file is validated against the json schema before being written.
36+
37+ To run the tests, run the following command:
38+
39+ ``` bash
40+ yarn test
41+ ```
3842
3943## Installing the extension locally
4044
@@ -44,7 +48,7 @@ changes.
4448``` bash
4549yarn install
4650yarn build
47- vsce package
51+
4852# replace `*` below with the version of the generated vsix file
4953code --install-extension scala-* .vsix
5054```
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ NEW_VERSION=${TRAVIS_TAG#"v"}
66
77# Build the extension
88yarn install
9- yarn build
9+ yarn build:syntax
1010yarn test
1111
1212# Update package.json and CHANGELOG.md
Original file line number Diff line number Diff line change 4444 "devDependencies" : {
4545 "@types/node" : " ^14.0.14" ,
4646 "ajv" : " ^6.12.2" ,
47+ "npm-run-all" : " ^4.1.5" ,
4748 "ts-node" : " ^8.10.2" ,
48- "tsc" : " ^1.20150623.0" ,
4949 "typescript" : " ^3.9.5" ,
5050 "vsce" : " ^1.77.0" ,
5151 "vscode-tmgrammar-test" : " 0.0.10"
5252 },
5353 "scripts" : {
5454 "vscode:prepublish" : " test -f ./syntaxes/Scala.tmLanguage.json" ,
5555 "vscode:publish" : " vsce publish --yarn" ,
56- "build" : " ts-node src/typescript/GenerateTmLanguageFile.ts > ./syntaxes/Scala.tmLanguage.json" ,
57- "test" : " node scripts/unit.js && node scripts/snap.js"
56+ "build" : " npm-run-all build:syntax build:extension" ,
57+ "build:syntax" : " ts-node src/typescript/GenerateTmLanguageFile.ts > ./syntaxes/Scala.tmLanguage.json" ,
58+ "build:extension" : " vsce package" ,
59+ "test" : " npm-run-all test:*" ,
60+ "test:unit" : " vscode-tmgrammar-test -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/unit/**/*.test.scala'" ,
61+ "test:snap" : " vscode-tmgrammar-snap -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/snap/**/*.test.scala'"
5862 }
5963}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments