SquidDev-CC / Howl

A CC build system
http://www.computercraft.info/forums2/index.php?/topic/21254-
MIT License
16 stars 4 forks source link

Dependencies:Resource() #19

Closed ardera closed 9 years ago

ardera commented 9 years ago

What about adding a Dependencies:Resource(f) function that includes the resource as a multilinestring instead of code?

SquidDev commented 9 years ago

So:

 Dependencies::Resource "myfile"
  :Name "something"

Would produce:

local something = [[contents of my file]]

This should be pretty easy to implement.

However should Verify still be called? I wonder if it should be possible to override verification (disable/enable for individual files). The same applies for other dependency hooks, as they are not files but resources, so line mapping is not really needed.

I presume this would be useful for embedded images and other similar sources?

ardera commented 9 years ago

Exactly, this would be, as you said, useful for including images (etc) Every File object should have a boolean called doVerification. By default, every module/mainmodule is verificated and every resource not, but I think one should have the ability to toggle the verification for every file object.

SquidDev commented 9 years ago

Pull request at #20