Skip to content

Commit 5b1f3d9

Browse files
authored
Refactor the build-one.sh script (#133)
* Switch to `npm ci`, which will not update the package-lock.json file * Move the call to webpack into `build-one.sh`
1 parent 4db72b2 commit 5b1f3d9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

integration-tests/js-compute/build-one.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ test="$1"
1111

1212
cd "$(dirname "${BASH_SOURCE[0]}")"
1313

14-
npm install -s
14+
npm ci -s
1515

1616
if [ -f "fixtures/$test/$test.ts" ]; then
17-
npm run -s build:test --test="$test"
17+
# TODO: we explicitly ignore errors from webpack, as the tests includes uses
18+
# of apis that are not yet typed by /sdk/js-compute/index.t.ts
19+
npm run webpack -- "./fixtures/$test/$test.ts" \
20+
--output-path "./fixtures/$test" \
21+
--output-filename "$test.js" || true
1822
else
1923
echo "Skipping typescript conversion for fixtures/$test/$test.js"
2024
fi

integration-tests/js-compute/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scripts": {
33
"install:ci": "npm ci",
4-
"build:test": "base=$npm_config_test; webpack \"./fixtures/$base/$base.ts\" --output-path \"./fixtures/$base\" --output-filename \"$base.js\"; true",
4+
"webpack": "webpack",
55
"lint": "npx prettier --write ./fixtures/**/*.ts"
66
},
77
"devDependencies": {

0 commit comments

Comments
 (0)