summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Katz <tomhuda@Yehudas-iMac.local>2011-12-27 18:15:44 -0800
committerYehuda Katz <tomhuda@Yehudas-iMac.local>2011-12-27 18:15:44 -0800
commit757d5250dcd7cd8a979b0c5d92f2a1d24f12e663 (patch)
tree9764e5b66cbac142d98d522ec255c965e1c308a4
parent163a92ebe0c3df4ab71268b954ebe6c021719e7f (diff)
downloadhandlebars.js-757d5250dcd7cd8a979b0c5d92f2a1d24f12e663.zip
handlebars.js-757d5250dcd7cd8a979b0c5d92f2a1d24f12e663.tar.gz
handlebars.js-757d5250dcd7cd8a979b0c5d92f2a1d24f12e663.tar.bz2
Rename "vm" to "runtime" for clarity
-rw-r--r--Rakefile56
-rw-r--r--lib/handlebars.js2
-rw-r--r--lib/handlebars/runtime.js (renamed from lib/handlebars/vm.js)2
-rw-r--r--spec/spec_helper.rb4
4 files changed, 32 insertions, 32 deletions
diff --git a/Rakefile b/Rakefile
index c276485..b6043c2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -38,11 +38,11 @@ def remove_exports(string)
match ? match[1] : string
end
-minimal_deps = %w(base compiler/parser compiler/base compiler/ast utils compiler/compiler vm).map do |file|
+minimal_deps = %w(base compiler/parser compiler/base compiler/ast utils compiler/compiler runtime).map do |file|
"lib/handlebars/#{file}.js"
end
-vm_deps = %w(base utils vm).map do |file|
+runtime_deps = %w(base utils runtime).map do |file|
"lib/handlebars/#{file}.js"
end
@@ -70,47 +70,47 @@ file "dist/handlebars.js" => minimal_deps do |task|
build_for_task(task)
end
-file "dist/handlebars.vm.js" => vm_deps do |task|
+file "dist/handlebars.runtime.js" => runtime_deps do |task|
build_for_task(task)
end
task :build => [:compile, "dist/handlebars.js"]
-task :vm => [:compile, "dist/handlebars.vm.js"]
+task :runtime => [:compile, "dist/handlebars.runtime.js"]
-desc "build the build and vm version of handlebars"
-task :release => [:build, :vm]
+desc "build the build and runtime version of handlebars"
+task :release => [:build, :runtime]
directory "vendor"
desc "benchmark against dust.js and mustache.js"
task :bench => "vendor" do
require "open-uri"
- File.open("vendor/mustache.js", "w") do |file|
- file.puts open("https://github.com/janl/mustache.js/raw/master/mustache.js").read
- file.puts "module.exports = Mustache;"
- end
+ #File.open("vendor/mustache.js", "w") do |file|
+ #file.puts open("https://github.com/janl/mustache.js/raw/master/mustache.js").read
+ #file.puts "module.exports = Mustache;"
+ #end
File.open("vendor/benchmark.js", "w") do |file|
- file.puts open("https://github.com/mathiasbynens/benchmark.js/raw/master/benchmark.js").read
+ file.puts open("https://raw.github.com/bestiejs/benchmark.js/master/benchmark.js").read
end
- if File.directory?("vendor/dustjs")
- system "cd vendor/dustjs && git pull"
- else
- system "git clone git://github.com/akdubya/dustjs.git vendor/dustjs"
- end
-
- if File.directory?("vendor/coffee")
- system "cd vendor/coffee && git pull"
- else
- system "git clone git://github.com/jashkenas/coffee-script.git vendor/coffee"
- end
-
- if File.directory?("vendor/eco")
- system "cd vendor/eco && git pull && npm update"
- else
- system "git clone git://github.com/sstephenson/eco.git vendor/eco && cd vendor/eco && npm update"
- end
+ #if File.directory?("vendor/dustjs")
+ #system "cd vendor/dustjs && git pull"
+ #else
+ #system "git clone git://github.com/akdubya/dustjs.git vendor/dustjs"
+ #end
+
+ #if File.directory?("vendor/coffee")
+ #system "cd vendor/coffee && git pull"
+ #else
+ #system "git clone git://github.com/jashkenas/coffee-script.git vendor/coffee"
+ #end
+
+ #if File.directory?("vendor/eco")
+ #system "cd vendor/eco && git pull && npm update"
+ #else
+ #system "git clone git://github.com/sstephenson/eco.git vendor/eco && cd vendor/eco && npm update"
+ #end
system "node bench/handlebars.js"
end
diff --git a/lib/handlebars.js b/lib/handlebars.js
index 222fcaf..8705269 100644
--- a/lib/handlebars.js
+++ b/lib/handlebars.js
@@ -6,7 +6,7 @@ module.exports = Handlebars;
require("./handlebars/utils");
require("./handlebars/compiler");
-require("./handlebars/vm");
+require("./handlebars/runtime");
// BEGIN(BROWSER)
diff --git a/lib/handlebars/vm.js b/lib/handlebars/runtime.js
index ecb4ce3..30798e8 100644
--- a/lib/handlebars/vm.js
+++ b/lib/handlebars/runtime.js
@@ -54,7 +54,7 @@ Handlebars.VM = {
} else if(partial instanceof Function) {
return partial(context, options);
} else if (!Handlebars.compile) {
- throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in vm mode");
+ throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
} else {
partials[name] = Handlebars.compile(partial);
return partials[name](context, options);
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4d4eee4..a83d16b 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -78,7 +78,7 @@ module Handlebars
Handlebars::Spec.js_load(context, 'lib/handlebars/base.js');
Handlebars::Spec.js_load(context, 'lib/handlebars/utils.js');
- Handlebars::Spec.js_load(context, 'lib/handlebars/vm.js');
+ Handlebars::Spec.js_load(context, 'lib/handlebars/runtime.js');
context["CompilerContext"] = {}
CompilerContext = context["CompilerContext"]
@@ -129,7 +129,7 @@ module Handlebars
Handlebars::Spec.js_load(context, 'lib/handlebars/compiler/visitor.js');
Handlebars::Spec.js_load(context, 'lib/handlebars/compiler/printer.js');
Handlebars::Spec.js_load(context, 'lib/handlebars/compiler/compiler.js');
- Handlebars::Spec.js_load(context, 'lib/handlebars/vm.js');
+ Handlebars::Spec.js_load(context, 'lib/handlebars/runtime.js');
context["Handlebars"]["logger"]["level"] = ENV["DEBUG_JS"] ? context["Handlebars"]["logger"][ENV["DEBUG_JS"]] : 4