Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mod] manage: add themes.live command (rebuild on modification) #664

Merged
merged 3 commits into from Jan 4, 2022

Conversation

return42
Copy link
Member

What does this PR do?

[mod] manage: add themes.live command (rebuild on modification)

Why is this change important?

To get live builds while editing the HTML client of a theme. The first argument of the command is the theme name:

./manage themes.live simple

To get live builds on make run use environment variable:

LIVE_THEME=simple make run

How to test this PR locally?

Start developer session:

LIVE_THEME=simple make run

and edit CSS (LESS) & JS of the simple theme.

Related issues

manage Outdated Show resolved Hide resolved
@not-my-profile
Copy link
Contributor

not-my-profile commented Dec 29, 2021

I left a comment regarding the error message. Otherwise LGTM :)

To have a live build while editing the HTML client of a theme.  The first
argument of the command is the theme name:

    ./manage themes.live simple

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Environment variable to get live builds while modifying CSS & JS of a theme::

    LIVE_THEME=simple make run

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42 return42 merged commit 00d3a74 into searxng:master Jan 4, 2022
return42 added a commit to return42/searxng that referenced this pull request Jan 5, 2022
Commit c7f2740 moves the 'python -m searx.webapp' process to the background.  A
background job can't open a simple python-debugger (pdb) console.

This patch moves all processes to the background except the searx.webapp.

Insert a debug point somewhere in the webapp application::

    import pdb
    pdb.set_trace()

And start a debug session by and test you break point::

    make run

To test that the entire 'make run' stops in the case of an error in the
themes.live background process try:

    make LIVE_THEME=typo-theme-name run

[1] searxng#664 (comment)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Jan 5, 2022
Commit c7f2740 moves the `python -m searx.webapp` process to the background.  A
background job can't open a simple python-debugger (pdb) console.

This patch moves all processes to the background except the searx.webapp.

Insert a break point somewhere in the webapp application::

    import pdb
    pdb.set_trace()

And start a debug session by::

    make run

and test you break point.

To test that the entire 'make run' stops in the case of an error in the
themes.live [1] background process try:

    make LIVE_THEME=typo-theme-name run

[1] searxng#664 (comment)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42 return42 deleted the themes.live branch January 24, 2022 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants