mudrd8mz / moodle-tool_pluginskel

Generator of Moodle plugins skeletons
https://moodle.org/plugins/tool_pluginskel
Other
51 stars 46 forks source link

Make mustache loader path configurable #79

Closed tmuras closed 6 years ago

tmuras commented 6 years ago

I'd like to replace current new module generation command in moosh from using https://github.com/moodlehq/moodle-mod_newmodule to use of this plugin.

I'd like to include the whole plugin code in moosh and therefore make it possible to generate Moodle plugins without local plugin installed inside Moodle.

I have nearly done that, the only problem I have is hardcoded path for filesystem Mustache loader:

'loader' => new Mustache_Loader_FilesystemLoader($CFG->dirroot.'/'.$CFG->admin.'/tool/pluginskel/skel'),

from: https://github.com/mudrd8mz/moodle-tool_pluginskel/blob/9b6adfd6493cf53e4ff9730b8de9035a4c2bbdcc/classes/local/util/mustache.php#L57

Would you consider making it configurable? For an instance passed as an extra parameter in \tool_pluginskel\local\util\manager::instance() function?

mudrd8mz commented 6 years ago

Sure. As long as the reasons are clearly documented, I am happy to accept such a pull request. Thanks Tomek!