mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-24 08:34:49 +00:00
Add docs on compiling the static admin assets
This commit is contained in:
parent
4614526416
commit
676799da45
1 changed files with 24 additions and 0 deletions
|
|
@ -82,6 +82,30 @@ If your Elasticsearch instance is located somewhere else, you can set the
|
|||
If you no longer want Wagtail to test against Elasticsearch, uninstall the
|
||||
``elasticsearch`` package.
|
||||
|
||||
Compiling static assets
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
All static assets such as JavaScript, CSS, images, and fonts for the Wagtail admin are compiled from their respective sources by ``gulp``. The compiled assets are not committed to the repository, and are compiled before packaging each new release. Compiled assets should not be submitted as part of a pull request.
|
||||
|
||||
To compile the assets, Node.js and the compilation tool chain need to be installed. Instructions for installing Node.js can be found on the `Node.js download page <https://nodejs.org/download/>`_. Once Node.js is installed, installing the tool chain is done via ``npm``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd /path/to/wagtail
|
||||
$ npm install
|
||||
|
||||
To compile the assets, run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ npm run build
|
||||
|
||||
This must be done after every change to the source files. To watch the source files for changes and then automatically recompile the assets, run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ npm start
|
||||
|
||||
Styleguide
|
||||
~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue