build(language-service): add script to build package locally (#38103)

This commit adds a script to build @angular/language-service
locally so that it can be consumed by the Angular extension for
local development.

PR Close #38103
This commit is contained in:
Keen Yee Liau 2020-07-16 12:03:12 -07:00 committed by Andrew Kushnir
parent e382632473
commit 58f6079873
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/bin/bash
set -ex
# This script is used for building the @angular/language-service package locally
# so that it can be consumed by the Angular extension for local development.
# Usage: ./build.sh /path/to/vscode-ng-language-service
readonly bazel_bin=$(yarn run -s bazel info bazel-bin)
readonly extension_repo="$1"
if [[ -z "${extension_repo}" ]]; then
echo "Please provide path to the vscode-ng-language-service repo"
exit 1
fi
yarn bazel build --config=release //packages/language-service:npm_package
pushd "${extension_repo}/server"
yarn add @angular/language-service@file:"${bazel_bin}/packages/language-service/npm_package"
popd