Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Documentation for merging a directory needs to specify that the require has to include the directory #107
Hmm I think I meant here: http://dev.iron.io/worker/reference/worker-files/
One hangup I ran into was not knowing to include the directory when I required the file. For example, this line in the .worker file:
Caused me to have to require a specific file in the worker like this:
But remembering to include the "models/" in the require took a few frustrating minutes.
Got it, thanks. This may be a "bug" in NG-I'll have to ask @iced what he thinks. We ran into a similar problem in April with the Python library, which has since been patched. Customers were expecting the merged folder to be the root, not be in the root. Either the docs need to specify this or the lib needs to evolve and change behaviour, or both.
I'm probably going to have the Python library follow NG's lead, as that's how it was designed in the first place. I just want to make sure I understand why that's the right way.
Should this be in the .worker file docs, though? My understanding is that those simply use the NG merge functions, so wouldn't it belong in the merge docs? We should find some way to call that out in the .worker docs, too, probably.