Haha, this is perfect, thanks! On Fri, May 12, 2017 at 1:17 PM, Mike Shal <[email protected]> wrote: > On Mon, May 8, 2017 at 5:53 PM, Ryan Gonzalez <[email protected]> wrote: >> Hello, fellow tuppece! (HAHAHAHAHA nvm) >> >> I'm trying to write a tool that lets me build Dart code using Tup, but >> I've come across a small problem: is it possible to use a recursive >> glob inside either a foreach or a Lua script? >> >> e.g. something like this: >> >> >> : foreach **.dart |> !dart2js |> %B.js > > I have no experience with dart specifically, but for tup it's best to > think of each directory independently. Eg in each directory you could > have a Tupfile like this: > > : foreach *.dart |> !dart2js |> %B.js > > But since putting duplicate Tupfiles in every directory is annoying, > there is a Tupdefault (and Tupdefault.lua) file, which will be used as > the Tupfile in all subdirectories if there is no explicit Tupfile. So > wherever you wanted to place this directory globbing file, make it a > Tupdefault file instead: > > : foreach *.dart |> !dart2js |> %B.js > > This is more efficient that a recursive directory glob, because now if > you add/remove a .dart file in a subdirectory, only that subdirectory > needs to be parsed instead of your whole tree. > > -Mike > > -- > -- > tup-users mailing list > email: [email protected] > unsubscribe: [email protected] > options: http://groups.google.com/group/tup-users?hl=en > --- > You received this message because you are subscribed to the Google Groups > "tup-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout.
-- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com/ -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
