mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FEATURE: automatically load plugin's rake tasks
This commit is contained in:
parent
98505f8969
commit
724f4a1c55
1 changed files with 3 additions and 0 deletions
|
@ -217,6 +217,9 @@ class Plugin::Instance
|
||||||
DiscoursePluginRegistry.register_glob(root_path, 'hbs')
|
DiscoursePluginRegistry.register_glob(root_path, 'hbs')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Automatically include all rake tasks
|
||||||
|
Rake.add_rakelib "#{File.dirname(path)}/lib/tasks"
|
||||||
|
|
||||||
self.instance_eval File.read(path), path
|
self.instance_eval File.read(path), path
|
||||||
if auto_assets = generate_automatic_assets!
|
if auto_assets = generate_automatic_assets!
|
||||||
assets.concat auto_assets.map{|a| [a]}
|
assets.concat auto_assets.map{|a| [a]}
|
||||||
|
|
Loading…
Reference in a new issue