KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My directory structure looks like this: |-- ball.lua |-- entity.lua |-- test `-- ball_test.lua I'm using the following code in test/ball_test.lua to require ball.lua from the parent directory: package.path = package.path .. ";../entity.lua" require("entity") package.path = package.path .. ";../ball.lua" require("ball") entity.lua is a dependency of ball.lua. So I require("entity") first otherwise I get a module 'entity.lua' not found error. This seems like a hack, what's a better way to do this?
Tags (comma-separated)
Save Edits
Cancel