Idea: linking a script to a file on disk

Post Reply
User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Idea: linking a script to a file on disk

Post by Vadi »

Idea: allow a script to be linked to a file on disk. This means it'll monitor that file for changes and dofile() it when it's changed (ie - save in your code editor, Mudlet auto-reloads).

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Idea: linking a script to a file on disk

Post by tsuujin »

This would certainly be nice, would save me from constantly running dofiles when i'm working on external scripting.

How would this work with required scripts, though? The way I load my system, I add my scripting folder to lua's PATH then require my main file... which requires in my entire system. Would you just have to manually add in each file in the system, or could you just add a "watch" directory that loads on change?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Idea: linking a script to a file on disk

Post by Vadi »

I'm not sure. You could have it watch one 'main' file that's auto-touched by your editor or somesuch when you save others for that.

Post Reply