quickstart.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .. _devquickstart:
  2. ======================
  3. Development Quickstart
  4. ======================
  5. .. _npm: https://www.npmjs.com/
  6. .. _Node.js: https://nodejs.org/
  7. SearXNG loves developers, just clone and start hacking. All the rest is done for
  8. you simply by using :ref:`make <makefile>`.
  9. .. code:: bash
  10. git clone https://github.com/searxng/searxng.git searxng
  11. Here is how a minimal workflow looks like:
  12. 1. *start* hacking
  13. 2. *run* your code: :ref:`make run`
  14. 3. *test* your code: :ref:`make test`
  15. If you think at some point something fails, go back to *start*. Otherwise,
  16. choose a meaningful commit message and we are happy to receive your pull
  17. request. To not end in *wild west* we have some directives, please pay attention
  18. to our ":ref:`how to contribute`" guideline.
  19. If you implement themes, you will need to setup a :ref:`make node.env` once:
  20. .. code:: bash
  21. make node.env
  22. Before you call *make run* (2.), you need to compile the modified styles and
  23. JavaScript:
  24. .. code:: bash
  25. make themes.all
  26. Alternatively you can also compile selective the theme you have modified,
  27. e.g. the *simple* theme.
  28. .. code:: bash
  29. make themes.simple
  30. .. tip::
  31. To get live builds while modifying CSS & JS use: ``LIVE_THEME=simple make run``
  32. If you finished your *tests* you can start to commit your changes. To separate
  33. the modified source code from the build products first run:
  34. .. code:: bash
  35. make static.build.restore
  36. This will restore the old build products and only your changes of the code
  37. remain in the working tree which can now be added & commited. When all sources
  38. are commited, you can commit the build products simply by:
  39. .. code:: bash
  40. make static.build.commit
  41. Commiting the build products should be the last step, just before you send us
  42. your PR. There is also a make target to rewind this last build commit:
  43. .. code:: bash
  44. make static.build.drop