2016-04-21 13:15:04 +02:00
|
|
|
.. _devquickstart:
|
|
|
|
|
2019-12-12 19:20:56 +01:00
|
|
|
======================
|
2016-02-01 21:28:13 +01:00
|
|
|
Development Quickstart
|
2019-12-12 19:20:56 +01:00
|
|
|
======================
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. _npm: https://www.npmjs.com/
|
2019-12-18 16:11:05 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
Searx loves developers, just clone and start hacking. All the rest is done for
|
|
|
|
you simply by using :ref:`make <makefile>`.
|
2016-02-01 21:28:13 +01:00
|
|
|
|
|
|
|
.. code:: sh
|
|
|
|
|
2021-04-25 12:03:54 +02:00
|
|
|
git clone https://github.com/searxng/searxng.git searx
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
Here is how a minimal workflow looks like:
|
2019-12-12 19:20:56 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
1. *start* hacking
|
|
|
|
2. *run* your code: :ref:`make run`
|
|
|
|
3. *test* your code: :ref:`make test`
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
If you think at some point something fails, go back to *start*. Otherwise,
|
|
|
|
choose a meaningful commit message and we are happy to receive your pull
|
|
|
|
request. To not end in *wild west* we have some directives, please pay attention
|
|
|
|
to our ":ref:`how to contribute`" guideline.
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
If you implement themes, you will need to compile styles and JavaScript before
|
|
|
|
*run*.
|
2016-02-01 21:28:13 +01:00
|
|
|
|
|
|
|
.. code:: sh
|
|
|
|
|
2021-06-26 13:10:56 +02:00
|
|
|
make themes.all
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
Don't forget to install npm_ first.
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. tabs::
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. group-tab:: Ubuntu / debian
|
2016-02-01 21:28:13 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. code:: sh
|
2016-04-21 13:15:04 +02:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
sudo -H apt-get install npm
|
2016-04-21 13:15:04 +02:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. group-tab:: Arch Linux
|
2019-12-12 19:20:56 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. code-block:: sh
|
2019-12-18 16:11:05 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
sudo -H pacman -S npm
|
2019-12-18 16:11:05 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. group-tab:: Fedora / RHEL
|
2019-12-12 19:20:56 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
.. code-block:: sh
|
2019-12-18 16:11:05 +01:00
|
|
|
|
2020-12-12 20:31:49 +01:00
|
|
|
sudo -H dnf install npm
|
2019-12-18 16:11:05 +01:00
|
|
|
|
2021-06-26 13:10:56 +02:00
|
|
|
If you finished your *tests* you can start to commit your changes. To separate
|
|
|
|
the changed code from the build products first run:
|
|
|
|
|
|
|
|
.. code:: sh
|
|
|
|
|
|
|
|
make static.build.restore
|
|
|
|
|
|
|
|
This will restore the old build products and only your changes of the code
|
|
|
|
remain in the working tree which can now be added & commited. When all sources
|
|
|
|
are commited, you can commit the build products simply by:
|
|
|
|
|
|
|
|
.. code:: sh
|
|
|
|
|
|
|
|
make static.build.commit
|
|
|
|
|
|
|
|
Commiting the build products should be the last step, just before you send us
|
|
|
|
your PR. There is also a make target to rewind this last build commit:
|
|
|
|
|
|
|
|
.. code:: sh
|
|
|
|
|
|
|
|
make static.build.drop
|