diff --git a/.npmrc b/.npmrc index c5ac9901c93..25ed63413bb 100644 --- a/.npmrc +++ b/.npmrc @@ -2,3 +2,4 @@ audit=false fund=false package-lock=true save-exact=true +cache=.npm-cache diff --git a/Makefile b/Makefile index d81f6a1d089..c99483dec54 100644 --- a/Makefile +++ b/Makefile @@ -671,11 +671,11 @@ npm-cache: .npm-cache $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui .npm-cache: package-lock.json rm -rf .npm-cache - $(eval ESBUILD_VERSION := `node -p "require('./package-lock.json').dependencies.esbuild.version"`) + $(eval ESBUILD_VERSION := $(shell node -p "require('./package-lock.json').dependencies.esbuild.version")) npm config --userconfig=.npmrc set cache=.npm-cache rm -rf node_modules && npm install --no-save npm config --userconfig=$(FOMANTIC_WORK_DIR)/.npmrc set cache=../../.npm-cache - echo esbuild-{darwin-64,linux-{arm,arm64,32,64},windows-{32,64}}@$(ESBUILD_VERSION) | tr " " "\n" | xargs -n 1 -P 4 npm cache add + echo $(foreach build, darwin-64 $(foreach arch,arm arm64 32 64,linux-${arch}) $(foreach arch,32 64,windows-${arch}), esbuild-${build}@$(ESBUILD_VERSION)) | tr " " "\n" | xargs -n 1 -P 4 npm cache add rm -rf $(FOMANTIC_WORK_DIR)/node_modules @touch .npm-cache diff --git a/web_src/fomantic/.npmrc b/web_src/fomantic/.npmrc index cc243d01b64..5f8054bbb03 100644 --- a/web_src/fomantic/.npmrc +++ b/web_src/fomantic/.npmrc @@ -1,2 +1,3 @@ optional=false package-lock=false +cache=../../.npm-cache