Permalink
Browse files

rename source code

  • Loading branch information...
1 parent 11364cc commit a502372df4c6d8af20c63aa37b76be2ea04d3531 @rcarver rcarver committed May 14, 2010
View
@@ -1,7 +1,7 @@
require 'rake/clean'
$LOAD_PATH.unshift File.dirname(__FILE__) + "/lib"
-require 'webfontjs'
+require 'webfontloader'
#
# Setup
@@ -24,7 +24,7 @@ AllJs = FileList["{src,src-test}/**/*"]
SourceJs = FileList["src/**/*"]
# JS Source loader
-@modules = WebFontJS::Modules.new
+@modules = WebFontLoader::Modules.new
#
# Build
@@ -86,12 +86,12 @@ end
desc "Start the demo server"
task :demo => "target/webfont.js" do |t|
js = t.prerequisites.first
- exec "bin/webfontjs-demos -F --compiled_js #{js}"
+ exec "bin/webfontloader-demos -F --compiled_js #{js}"
end
desc "Start the demo server for development"
task :demodev do
- exec "bin/webfontjs-demos -F -L --modules"
+ exec "bin/webfontloader-demos -F -L --modules"
end
desc "Find out how many bytes the source is"
View
@@ -3,10 +3,10 @@
require 'rubygems'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + "/../lib")
-require 'webfontjs'
+require 'webfontloader'
begin
- require 'webfontjs/demo/server'
+ require 'webfontloader/demo/server'
rescue LoadError => e
abort "Please gem install sinatra"
end
@@ -17,12 +17,12 @@ rescue LoadError => e
abort "Please gem install vegas"
end
-Vegas::Runner.new(WebFontJS::Demo::Server, 'font-demos') do |runner, opts, app|
+Vegas::Runner.new(WebFontLoader::Demo::Server, 'font-demos') do |runner, opts, app|
opts.on('--compiled_js FILE', "Dynamically build the JS with the given modules") { |file|
app.set :compiled_js, File.read(file)
}
opts.on('--modules [MODULES]', "Dynamically build the JS with the given modules") { |opt_modules|
modules = opt_modules ? opt_modules.split(",") : []
- app.set :modules, WebFontJS::Modules.new(*modules)
+ app.set :modules, WebFontLoader::Modules.new(*modules)
}
end
@@ -1,8 +1,8 @@
require 'yaml'
-require 'webfontjs/modules'
+require 'webfontloader/modules'
-module WebFontJS
+module WebFontLoader
VERSION = '0.0.0'
ProjectRoot = File.expand_path(File.dirname(__FILE__) + "/..")
@@ -1,7 +1,7 @@
require 'sinatra/base'
require 'open-uri'
-module WebFontJS
+module WebFontLoader
module Demo
class Server < Sinatra::Base
@@ -70,7 +70,7 @@ def get_js_code
if settings.compiled_js
settings.compiled_js
elsif settings.modules
- settings.modules.all_source_files.map { |file| File.read(File.join(WebFontJS::ProjectRoot, file)) }
+ settings.modules.all_source_files.map { |file| File.read(File.join(WebFontLoader::ProjectRoot, file)) }
else
"alert('No JavaScript has been configured in the demo server');"
end
@@ -1,8 +1,8 @@
-module WebFontJS
+module WebFontLoader
class Modules
def initialize(*modules)
- @project_root = WebFontJS::ProjectRoot
+ @project_root = WebFontLoader::ProjectRoot
@js_src = "src"
@js_test = "src-test"
@modules = modules.empty? ? config.keys : modules

0 comments on commit a502372

Please sign in to comment.