riot / cli

Riot.js command line tool
MIT License
46 stars 9 forks source link

--watch not working on Windows #34

Closed Svish closed 6 years ago

Svish commented 6 years ago

Trying to follow this tutorial about getting started with Riot. Was introduced to --watch, but it doesn't seem to do anything on my machine?

All it does is print out a "Watching" message, but it doesn't even compile the tags to begin with, let alone watch for any changes. I.e. after I run the command, I still have no index.js, and re-saving any files doesn't trigger anything either. 😟

capture

Zipped up code, in case structure has anything to do with it: riot-1.zip


riot-cli:      4.1.0 - https://github.com/riot/cli
riot-compiler: 3.5.1 - https://github.com/riot/compiler
windows:       10, Version 1803
GianlucaGuarini commented 6 years ago

can you try with the newest cli version? npm i riot-cli -g

Svish commented 6 years ago

@GianlucaGuarini Not sure if I'm doing it correctly (also, why isn't riot-cli latest already?), but as far as I can see it's the same result:

capture

GianlucaGuarini commented 6 years ago

the riot-cli@4 uses still an old chokidar version for the fs.watcher. The riot-cli@5 instead uses the newest chokidar@2 but it's a breaking change that can not land directly in riot@3 so I had to release it separately. I will look into this issue thanks for reporting it

GianlucaGuarini commented 6 years ago

this issue should be fixed in the latest cli versions riot-cli@4.1.1 and riot-cli@5.1.1