Skip to content

Commit e31d4c7

Browse files
committed
Release 10.1.5
Refine the `dist` step by creating a proper temporary file. I spent a lot of time trying to pinpoint the underlying cause, why translation chunk files are empty when generating a bundle with newer JS features (i.e. not pinning preset-env to IE11) but couldn't find it.
1 parent c30569d commit e31d4c7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ src/headless/dist/converse-headless.min.js: src webpack/webpack.common.js node_m
205205

206206
dist:: node_modules src/* | dist/website.css dist/website.min.css
207207
npm run headless
208-
# Ideally this should just be `npm run nodeps`.
209-
# The additional steps are necessary to properly generate JSON files from
210-
# the .po files. The nodeps config uses preset-env with IE11 to turn all
211-
# template literals into old JS strings, which is required because
212-
# gettext 0.21 doesn't support template literals.
208+
# Ideally this should just be `npm run build`.
209+
# The additional steps are necessary to properly generate JSON chunk files
210+
# from the .po files. The nodeps config uses preset-env with IE11.
211+
# Somehow this is necessary.
213212
npm run nodeps
214-
mkdir tmp && mv dist/locales tmp
215-
npm run build
216-
cp tmp/locales/*-po.js dist/locales/
217-
rm -rf tmp
213+
$(eval TMPD := $(shell mktemp -d))
214+
mv dist/locales $(TMPD) && \
215+
npm run build && \
216+
mv $(TMPD)/locales/*-po.js dist/locales/ && \
217+
rm -rf $(TMPD)
218218

219219
.PHONY: install
220220
install:: dist

0 commit comments

Comments
 (0)