From 8ad52d0aa690ca52cfd5b49b0dfe48e38fe4e7bc Mon Sep 17 00:00:00 2001 From: Maxime Kjaer Date: Thu, 2 Jul 2020 23:19:19 +0200 Subject: [PATCH] Add extension build script --- CONTRIBUTING.md | 4 +--- package.json | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1689319..6af8cf9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,8 +9,6 @@ for Visual Studio Code. Make sure you have the following binaries installed: - [`yarn`](https://yarnpkg.com/en/): to build the project -- [`vsce`](https://code.visualstudio.com/api/working-with-extensions/publishing-extension): - to package the extension for VS Code. - [`code`](https://code.visualstudio.com/docs/setup/mac): to launch VS Code from the terminal. @@ -50,7 +48,7 @@ changes. ```bash yarn install yarn build -vsce package + # replace `*` below with the version of the generated vsix file code --install-extension scala-*.vsix ``` diff --git a/package.json b/package.json index a6e8f62..f0de91a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,9 @@ "scripts": { "vscode:prepublish": "test -f ./syntaxes/Scala.tmLanguage.json", "vscode:publish": "vsce publish --yarn", - "build": "ts-node src/typescript/GenerateTmLanguageFile.ts > ./syntaxes/Scala.tmLanguage.json", + "build": "npm-run-all build:syntax build:extension", + "build:syntax": "ts-node src/typescript/GenerateTmLanguageFile.ts > ./syntaxes/Scala.tmLanguage.json", + "build:extension": "vsce package", "test": "npm-run-all test:*", "test:unit": "vscode-tmgrammar-test -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/unit/**/*.test.scala'", "test:snap": "vscode-tmgrammar-snap -s source.scala -g syntaxes/Scala.tmLanguage.json -t 'tests/snap/**/*.test.scala'"