truemedian / luvit-api-design

11 stars 2 forks source link

Load entry file manually #26

Open TohruMKDM opened 2 years ago

TohruMKDM commented 2 years ago

In Luvit 2.x the entry file is required rather then loaded (with fs.readFileSync + load) which causes two issues.

  1. It requires the input file to have a .lua, .so, or .dll extension and I do not believe an entry file should require any specific filename extension.

  2. It prevents command line arguments getting passed to the entry file in the form of ... This would also get remedied by this change as you'll just be able to do load(data)(unpack(args))