mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
relocate emoji plugin, stop pre-compiling assets
This commit is contained in:
@ -154,7 +154,7 @@ class Plugin::Instance
|
||||
end
|
||||
unless assets.blank?
|
||||
assets.each do |asset|
|
||||
if asset =~ /\.js$/
|
||||
if asset =~ /\.js$|.js.erb$/
|
||||
DiscoursePluginRegistry.javascripts << asset
|
||||
elsif asset =~ /\.css$|\.scss$/
|
||||
DiscoursePluginRegistry.stylesheets << asset
|
||||
@ -171,6 +171,15 @@ class Plugin::Instance
|
||||
DiscoursePluginRegistry.server_side_javascripts << js
|
||||
end
|
||||
end
|
||||
|
||||
public_data = File.dirname(path) + "/public"
|
||||
if Dir.exists?(public_data)
|
||||
target = Rails.root.to_s + "/public/plugins/"
|
||||
`mkdir -p #{target}`
|
||||
target << name
|
||||
# TODO a cleaner way of registering and unregistering
|
||||
`ln -s #{public_data} #{target}` unless File.exists? target
|
||||
end
|
||||
end
|
||||
|
||||
def auth_provider(opts)
|
||||
@ -206,7 +215,7 @@ class Plugin::Instance
|
||||
end
|
||||
else
|
||||
puts "You are specifying the gem #{name} in #{path}, however it does not exist!"
|
||||
exit -1
|
||||
exit(-1)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user