Skip to content

Commit

Permalink
chore(javascript): split build task to avoid memory issue (#383)
Browse files Browse the repository at this point in the history
* chore(javascript): split build task to avoid memory issue

* Update clients/algoliasearch-client-javascript/rollup.config.js

Co-authored-by: Pierre Millot <pierre.millot@algolia.com>

Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
eunjae-lee and millotp committed Apr 19, 2022
1 parent 5673173 commit 27b171d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Build clients
shell: bash
run: yarn build
run: yarn build:all

- name: Publish to NPM
shell: bash
Expand Down
1 change: 1 addition & 0 deletions clients/algoliasearch-client-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
],
"scripts": {
"build": "CLIENT=${0:-all} yarn rollup -c rollup.config.js",
"build:all": "./scripts/build_all.sh",
"build:utils": "yarn build utils",
"clean": "rm -rf packages/*/dist || true",
"clean:utils": "yarn workspace @experimental-api-clients-automation/client-common clean && yarn workspace @experimental-api-clients-automation/requester-node-http clean && yarn workspace @experimental-api-clients-automation/requester-browser-xhr clean",
Expand Down
11 changes: 11 additions & 0 deletions clients/algoliasearch-client-javascript/scripts/build_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

yarn build utils

PACKAGES_EXCEPT_FOR_UTILS=$(ls ./packages | grep -v -E "(client-common|requester-)")

for CLIENT in $PACKAGES_EXCEPT_FOR_UTILS
do
SKIP_UTILS=true yarn build $CLIENT
done

0 comments on commit 27b171d

Please sign in to comment.