I am just curious if there is a recommendation for creating modules... I have seen that others have built on it but I am unsure how they got started. I assumed that they had created the module outside of the application then merged it into it.
We don't do anything but modules, we only have extended core classes, base classes and generic helper classes in app/classes.
A module is, from a code point of view, identical to app, it only has a namespace statement at the top of each file. If you're on 1.8/develop, you can have oil generate a module structure.
I have an empty module ready, that started from a copy of the contents of fuel/app, which all the welcome stuff removed. I just copy that in.
You can always generate as normal, and then move the file from app/classes to the yourmodule/classes folder. All you need to add manually is the namespace statement.
I personally never generate anything. Once you've made your first controller and you're happy with it, strip it to a generic "skeleton" controller, and re-use that where needed.
I saw that you merged it but I am unable to retrieve the update... I think I might be trying to update incorrectly but I am still learning how to use Github. As far as I can tell, I can only pull the updates from the same repository which is fuel/fuel to my moakdesigns/fuel but I don't think I can merge updates from other repositories such as fuel/oil.
The reason why I say this is that I am still getting the help screen whenever I try running the command line as you have written in the docs.
After I downloaded the latest oil package from oil repository and pasted everything, I have this odd uncommitted change that keeps popping up saying Submodule 23834878b(whatever the number is)-dirty and it will not disappear until I removed the new package and put the old one back after I saved the old oil package.
I did try the git submodule update and I am not getting any notification on command line about any updates and when I do run the command, all it does is create empty folders, nothing else. So I assume from @kesali you would have to run the extra commands if you want to scaffold anything into the module folder?
I assume this works just fine with admin scaffold correct?
The problem with submodules in general is that they are fixed links to a specific commit hash in the referred-to repository. Which means that if that repo has new commits, you won't see them until the submodule references in fuel/fuel are updated.
I usually go into the repo folder (in this case fuel/packages/oil), and do a 'git checkout 1.8/develop' to switch to the develop branch, and a 'git pull' to make sure you have the latest code. And forget about these silly submodules...
MoakDesigns, I did not implemented the --module for "oil g admin", only for other generating tasks. If there's need for it you're always welcome to make a PR ;)
@MoakDesigns, you can create modules using "oil generate module <name>" as the docs state. Then, every generate argument (except for "admin") takes the --module option (but beware of "oil g config", there's already been a --module option which I haven't altered the behavior of). Using the --module=<name> all generated files i.e., migrations, models, will be put into the module's respective folder.
At least it worked for me and my tests. If something's not working properly, feel free to ask or nag about it ;) using the forums, the IRC channel, or github (here's the forked repo I used to create the PR https://github.com/philipptempel/fuel-oil/tree/patch/module_support)
The --module option is a simple switch for the command line to "pipe" all output i.e., files created like models, migrations, controller, ..., to be created within the directory of the module and not within APPPATH. You can use it easily via e.g. ```$ php oil generate model --module=blog post body:mediumtext```