quickstart.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. .. _devquickstart:
  2. ======================
  3. Development Quickstart
  4. ======================
  5. .. _npm: https://www.npmjs.com/
  6. SearXNG loves developers, just clone and start hacking. All the rest is done for
  7. you simply by using :ref:`make <makefile>`.
  8. .. code:: sh
  9. git clone https://github.com/searxng/searxng.git searx
  10. Here is how a minimal workflow looks like:
  11. 1. *start* hacking
  12. 2. *run* your code: :ref:`make run`
  13. 3. *test* your code: :ref:`make test`
  14. If you think at some point something fails, go back to *start*. Otherwise,
  15. choose a meaningful commit message and we are happy to receive your pull
  16. request. To not end in *wild west* we have some directives, please pay attention
  17. to our ":ref:`how to contribute`" guideline.
  18. If you implement themes, you will need to compile styles and JavaScript before
  19. *run*.
  20. .. code:: sh
  21. make themes.all
  22. Don't forget to install npm_ first.
  23. .. tabs::
  24. .. group-tab:: Ubuntu / debian
  25. .. code:: sh
  26. sudo -H apt-get install npm
  27. .. group-tab:: Arch Linux
  28. .. code-block:: sh
  29. sudo -H pacman -S npm
  30. .. group-tab:: Fedora / RHEL
  31. .. code-block:: sh
  32. sudo -H dnf install npm
  33. If you finished your *tests* you can start to commit your changes. To separate
  34. the changed code from the build products first run:
  35. .. code:: sh
  36. make static.build.restore
  37. This will restore the old build products and only your changes of the code
  38. remain in the working tree which can now be added & commited. When all sources
  39. are commited, you can commit the build products simply by:
  40. .. code:: sh
  41. make static.build.commit
  42. Commiting the build products should be the last step, just before you send us
  43. your PR. There is also a make target to rewind this last build commit:
  44. .. code:: sh
  45. make static.build.drop