Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hint to use bun to build admin #782

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions cookbook/build-admin-frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@ on your computer.
npm install
npm run build

Solution 4: Build manually locally with bun
-------------------------------------------

As an alternative to node/npm Sulu also supports to use `bun`_ to build the administration interface.
The support for bun is experimental and can be removed in future versions of Sulu.

1. Install Bun

If not yet installed on your computer you would need to install `bun`_
on your computer.

2. Cleanup previously created node_modules folders and bun.lockb files

.. code-block:: bash

cd /var/project
rm -rf assets/admin/node_modules && rm -rf vendor/sulu/sulu/node_modules && rm -rf vendor/sulu/sulu/src/Sulu/Bundle/*/Resources/js/node_modules
rm -rf assets/admin/bun.lockb && rm -rf vendor/sulu/sulu/bun.lockb && rm -rf vendor/sulu/sulu/src/Sulu/Bundle/*/Resources/js/bun.lockb

3. Create the administration interface build

.. code-block:: bash

cd /var/project/assets/admin
bun run preinstall
bun install
bun run build

Common errors
-------------

Expand Down Expand Up @@ -110,3 +138,4 @@ If this does not solve the problem, you can try to clean the npm cache on your m
.. _Test Application workflow: https://github.com/sulu/sulu/blob/2.x/.github/workflows/test-application.yaml
.. _sulu/skeleton repository: https://github.com/sulu/skeleton
.. _node: https://nodejs.org/en/
.. _bun: https://bun.sh/
Loading