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

Watchmode does not watch .md anymore (with custom css) ? #267

Closed
lsignac opened this issue Jul 28, 2020 · 5 comments
Closed

Watchmode does not watch .md anymore (with custom css) ? #267

lsignac opened this issue Jul 28, 2020 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lsignac
Copy link

lsignac commented Jul 28, 2020

Watch mode does not update .html although an update of the css file triggers conversion, in preview mode only :

$ marp -p -w  --theme-set ~/marpthemes  P_P1A_00.md
[  INFO ] Converting 1 markdown...
[  INFO ] P_P1A_00.md => P_P1A_00.html
[  INFO ] [Watch mode] Start watching...
[  INFO ] [Preview] (EXPERIMENTAL) Opening
          file:///...
[  INFO ] P_P1A_00.md => P_P1A_00.html      <=== When I update the CSS file in ~/marpthemes
                                      <=== Nothing happens if I update the .md file...

If I use :

$ marp -p -w  P_P1A_00.md

Then the watch mod id OK for .md file... but theme falls back to default, of course.

I use the standalone binary :

marp -v
@marp-team/marp-cli v0.20.0 (w/ @marp-team/marp-core v1.2.2)

If I use marp in server mode -s option, then watch mode works correctly even if I set --theme-set (but I'd rather not to use server mode).
marp vscode plugin works like a charm.

Thank you for your work (I use marp for everyday work).

@lsignac lsignac changed the title Watchmod does not watch .md anymore ? Watchmode does not watch .md anymore ? Jul 28, 2020
@lsignac lsignac changed the title Watchmode does not watch .md anymore ? Watchmode does not watch .md anymore (with curstom css) ? Jul 28, 2020
@lsignac lsignac changed the title Watchmode does not watch .md anymore (with curstom css) ? Watchmode does not watch .md anymore (with custom css) ? Jul 28, 2020
@yhatt
Copy link
Member

yhatt commented Jul 28, 2020

I tried some situations to watch the change of both Markdown and theme CSS, but I could not reproduce failure of observation as you told in my environment (Windows + Marp CLI v0.20.0 standalone build). Probably you may have met a special case.

We require more contexts to determine root cause of the issue: OS, file structures, permissions, and so on.

@yhatt yhatt added the help wanted Extra attention is needed label Jul 28, 2020
@lsignac
Copy link
Author

lsignac commented Jul 28, 2020

Context :

$ ls -lR
.:
total 110240
-rwxr-xr-x 1 signac 1000 112877006 28 juil. 15:01 marp-0.20.0
-rw-r--r-- 1 signac 1000        59 28 juil. 15:21 test.md
drwxr-xr-x 2 signac 1000      4096 28 juil. 15:15 themes

./themes:
total 4
-rw-r--r-- 1 signac 1000 93 28 juil. 15:15 test.css

$ uname -a
Linux snarkturne 5.7.7-arch1-1 #1 SMP PREEMPT Wed, 01 Jul 2020 14:53:16 +0000 x86_64 GNU/Linux

$ ./marp-0.20.0 -v
@marp-team/marp-cli v0.20.0 (w/ @marp-team/marp-core v1.2.2)

$$ chromium --version    # Mmmmm probably you don't need this one... :)
Chromium 83.0.4103.116 Arch Linux

I found it more easy to provide a sample video of what happens. You can find it here https://upload.univ-poitiers.fr/l5m6yj8x (it will be deleted in 5 days).
Making the video, I found that it was possible to call marp -p with a directory (instead of a file... but I did not try with a directory containing several files...). And then it works again !
You can not see it in the video but if I remove theme from markdown file, and if I empty the themes directory, the same behavior can be observed. It seems to come from the command line invocation : --theme-set ... with -p and watch mode is disabled for .md file !

I'm pretty sure this is new (version > 17 ?)

@yhatt yhatt added the bug Something isn't working label Jul 28, 2020
@mark2185
Copy link

mark2185 commented Mar 27, 2021

Can confirm, same thing happening to me when using the official docker, it just stops detecting changes after some time.

Writing the .css file again fixes it, it seems.

@yhatt
Copy link
Member

yhatt commented Feb 18, 2023

Related: #498

Close for cleaning up Marp CLI issue tracker. Please report this to chokidar, a file watcher Marp CLI is using.

@yhatt yhatt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants