relocate emoji plugin, stop pre-compiling assets

This commit is contained in:
Sam
2013-11-20 14:38:21 +11:00
parent a468d6cfb0
commit 8278fdb9dd
1748 changed files with 181 additions and 404 deletions

View File

@ -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