summaryrefslogtreecommitdiff
path: root/docs/dev/quickstart.rst
blob: d2b666c0952a4f2b9a487a7ae6ddc5105110735c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.. _devquickstart:

======================
Development Quickstart
======================

.. _npm: https://www.npmjs.com/
.. _Node.js: https://nodejs.org/

SearXNG loves developers, just clone and start hacking.  All the rest is done for
you simply by using :ref:`make <makefile>`.

.. code:: sh

    git clone https://github.com/searxng/searxng.git searxng

Here is how a minimal workflow looks like:

1. *start* hacking
2. *run* your code: :ref:`make run`
3. *test* your code: :ref:`make test`

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.

If you implement themes, you will need to setup a :ref:`make node.env` once:

.. code:: sh

   make node.env

Before you call *make run* (2.), you need to compile the modified styles and
JavaScript:

.. code:: sh

   make themes.all

Alternatively you can also compile selective the theme you have modified,
e.g. the *simple* theme.
.. code:: sh

   make themes.simple

If you finished your *tests* you can start to commit your changes.  To separate
the modified source 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