Permalink
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (40 sloc) 1.12 KB
require 'yaml'
CONFIG = YAML.load_file('config/config.yml')[(ENV['ENVIRONMENT'] || 'development').to_sym]
# JBundle configuration file
# https://github.com/ismasan/jbundle
target_dir './dist'
src_dir './src'
version '1.11.0'
bundle 'pusher.js' do
license 'pusher-licence.js'
file 'pusher.js'
file 'pusher_event_dispatcher.js'
file 'pusher_machine.js'
file 'net_info.js'
file 'pusher_connection.js'
file 'pusher_channels.js'
file 'dependencies.js'
end
bundle 'flashfallback.js' do
license 'web-socket-js-licence.js'
file 'web-socket-js/swfobject.js'
file 'web-socket-js/web_socket.js'
end
file 'json2.js'
# Just copy this file across
file 'web-socket-js/WebSocketMainInsecure.swf' => 'WebSocketMain.swf'
# Runs for every bundle and license source.
filter do |src, config|
src.gsub! /<VERSION>/, config.version.to_s
src.gsub! /<CDN_HTTP>/, CONFIG[:js][:cdn][:http]
src.gsub! /<CDN_HTTPS>/, CONFIG[:js][:cdn][:https]
src
end
# some_dependency.js
filter :src do |src, config|
src.gsub /<DEPENDENCY_SUFFIX>/, ''
end
# some_dependency.min.js
filter :min do |src, config|
src.gsub /<DEPENDENCY_SUFFIX>/, '.min'
end