Skip to content

Commit

Permalink
Add more notes on what's going on there
Browse files Browse the repository at this point in the history
  • Loading branch information
jokesterfr committed Dec 7, 2023
1 parent 40e3181 commit 96c68f2
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions examples/develop-prestashop/init-scripts/build-assets.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
#!/bin/sh
set -eu

echo "* Build PrestaShop assets..."
echo "* Download composer dependencies..."
make composer

echo "* Build PrestaShop assets..."
# Disclaimer: it seems that the PrestaShop front-end assets currently require
# to install Node.js dependencies globally. This is a bad pattern, which would
# require this script to be run as root.
#
# As an alternative, we propose this NPM_PREFIX_DIR hack suggestion, which could
# eventually help to avoid running init-scripts as root in the future
#
NPM_PREFIX_DIR=/tmp/npm
mkdir -p $NPM_PREFIX_DIR
npm prefix -g $NPM_PREFIX_DIR
export PATH="$PATH:$NPM_PREFIX_DIR/bin"
make assets
echo "* Assets built!"

echo "✅ Assets built!"

0 comments on commit 96c68f2

Please sign in to comment.