File tree 6 files changed +344
-34
lines changed
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.
9
9
Make sure you have the following binaries installed:
10
10
11
11
- [ ` 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.
14
12
- [ ` code ` ] ( https://code.visualstudio.com/docs/setup/mac ) : to launch VS Code from
15
13
the terminal.
16
14
@@ -32,9 +30,15 @@ command:
32
30
yarn build
33
31
```
34
32
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
+ ```
38
42
39
43
## Installing the extension locally
40
44
@@ -44,7 +48,7 @@ changes.
44
48
``` bash
45
49
yarn install
46
50
yarn build
47
- vsce package
51
+
48
52
# replace `*` below with the version of the generated vsix file
49
53
code --install-extension scala-* .vsix
50
54
```
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ NEW_VERSION=${TRAVIS_TAG#"v"}
6
6
7
7
# Build the extension
8
8
yarn install
9
- yarn build
9
+ yarn build:syntax
10
10
yarn test
11
11
12
12
# Update package.json and CHANGELOG.md
Original file line number Diff line number Diff line change 44
44
"devDependencies" : {
45
45
"@types/node" : " ^14.0.14" ,
46
46
"ajv" : " ^6.12.2" ,
47
+ "npm-run-all" : " ^4.1.5" ,
47
48
"ts-node" : " ^8.10.2" ,
48
- "tsc" : " ^1.20150623.0" ,
49
49
"typescript" : " ^3.9.5" ,
50
50
"vsce" : " ^1.77.0" ,
51
51
"vscode-tmgrammar-test" : " 0.0.10"
52
52
},
53
53
"scripts" : {
54
54
"vscode:prepublish" : " test -f ./syntaxes/Scala.tmLanguage.json" ,
55
55
"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'"
58
62
}
59
63
}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments